Refactor: Menu

This commit is contained in:
Tom Wiesing 2023-02-03 15:46:53 +01:00
parent a7309d5268
commit 7f820224ec
No known key found for this signature in database
16 changed files with 103 additions and 92 deletions

View file

@ -53,11 +53,15 @@ func (legal *Legal) Routes() component.Routes {
}
}
var (
menuLegal = component.MenuItem{Title: "Legal", Path: "/legal/"}
)
func (legal *Legal) HandleRoute(ctx context.Context, route string) (http.Handler, error) {
tpl := legalTemplate.Prepare(
legal.Dependencies.Templating,
templating.Crumbs(
component.MenuItem{Title: "Legal", Path: "/legal/"},
menuLegal,
),
)