Skip to content

Commit

Permalink
fix: remove pointer in Header
Browse files Browse the repository at this point in the history
  • Loading branch information
mous1985 committed Feb 25, 2025
1 parent 0db0a14 commit 60d27e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/gno.land/r/mouss/home/home.gno
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func Unfollow() error {
// renderRecipes renders the list of recipes.
func renderRecipes(res *mux.ResponseWriter, req *mux.Request) {
var out string
Header(&out)
Header(out)
out += "## World Kitchen\n\n------\n\n"

// Link to margarita pizza recipe
Expand Down Expand Up @@ -198,7 +198,7 @@ func renderRecipe(res *mux.ResponseWriter, req *mux.Request) {

func (r Recipe) Render() string {
var out string
Header(&out)
Header(out)
out += md.H2(r.Name)
out += md.Bold("Author:") + "\n" + r.Author.String() + "\n\n"
out += md.Bold("Origin:") + "\n" + r.Origin + "\n\n"
Expand All @@ -213,7 +213,7 @@ func (r Recipe) Render() string {

func renderHomepage(res *mux.ResponseWriter, req *mux.Request) {
var out string
Header(&out)
Header(out)
out += profile.Render()
res.Write(out)
}
Expand All @@ -237,13 +237,13 @@ func (p Profile) Render() string {
return out
}

func Header(out *string) {
func Header(out string) {
navItems := []string{
md.Link("Home", realmURL),
md.Link("World Kitchen", rec),
md.Link("Hackerspace", "https://github.com/gnolang/hackerspace/issues/86#issuecomment-2535795751"),
}
*out += strings.Join(navItems, " | ") + "\n\n" + md.HorizontalRule() + "\n\n"
out += strings.Join(navItems, " | ") + "\n\n" + md.HorizontalRule() + "\n\n"
}

func Render(path string) string {
Expand Down

0 comments on commit 60d27e0

Please sign in to comment.