package nav import "projectreshoot/pkg/contexts" type ProfileItem struct { name string // Label to display href string // Link reference } // Return the list of profile links func getProfileItems() []ProfileItem { return []ProfileItem{ { name: "Profile", href: "/profile", }, { name: "Account", href: "/account", }, } } // Returns the right portion of the navbar templ navRight() { {{ user := contexts.GetUser(ctx) }} {{ items := getProfileItems() }}
if user != nil {
} else { }
}