Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
matijamarjanovic committed Dec 19, 2024
1 parent 845813e commit 38fd2fc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
27 changes: 14 additions & 13 deletions examples/gno.land/r/demo/btree_dao/btree_dao.gno
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
package btree_dao

import (
"errors"
"std"
"strings"
"time"
"errors"

"gno.land/p/demo/btree"
"gno.land/p/demo/grc/grc721"
"gno.land/p/moul/md"
"gno.land/p/demo/ufmt"

"gno.land/p/moul/md"
)

// RegistrationDetails holds the details of a user's registration
type RegistrationDetails struct {
Address std.Address
RegTime time.Time
UserBTree *btree.BTree
NFTID int
Address std.Address
RegTime time.Time
UserBTree *btree.BTree
NFTID int
}

// Less implements the Record interface for RegistrationDetails
Expand All @@ -27,7 +28,7 @@ func (rd *RegistrationDetails) Less(than btree.Record) bool {
}

var (
dao = grc721.NewBasicNFT("BTree DAO", "BTDAO")
dao = grc721.NewBasicNFT("BTree DAO", "BTDAO")
tokenID = 0
members = btree.New()
)
Expand Down Expand Up @@ -126,9 +127,9 @@ func Render(path string) string {
nftList += ", "
}
if regDetails.UserBTree == nil {
nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds
nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds
} else {
nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters
nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters
}
}
nftList += ")"
Expand All @@ -153,9 +154,9 @@ func Render(path string) string {
nftList += ", "
}
if regDetails.UserBTree == nil {
nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds
nftList += "🌱#" + ufmt.Sprintf("seed_%d", regDetails.NFTID) // Seed emoji for seeds
} else {
nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters
nftList += "🌳#" + ufmt.Sprintf("%d", regDetails.NFTID) // Tree emoji for tree planters
}
}
nftList += ")"
Expand All @@ -168,7 +169,7 @@ func Render(path string) string {

// Use the md package to format the output
var sb strings.Builder

sb.WriteString(md.H1("B-Tree DAO Members"))
sb.WriteString(md.H2("Total NFTs Minted"))
sb.WriteString(ufmt.Sprintf("Total NFTs minted: %d\n\n", dao.TokenCount()))
Expand Down
2 changes: 1 addition & 1 deletion examples/gno.land/r/demo/btree_dao/gno.mod
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
module gno.land/r/matijamarjanovic/btree_dao
module gno.land/r/demo/btree_dao

0 comments on commit 38fd2fc

Please sign in to comment.