Render default route on "/"
This commit is contained in:
@@ -89,6 +89,7 @@ type HtmxRoute interface {
|
||||
GetHtmx(language Language, queryParams ...HtmxPathParam) gomponents.Node
|
||||
SetActivePath(activePath *ActivePath) HtmxRoute
|
||||
Add(server *http.ServeMux)
|
||||
Execute(c HtmxContext)
|
||||
}
|
||||
|
||||
func addLanguageToPath(path string, language Language) string {
|
||||
@@ -102,6 +103,10 @@ type HtmxGetRoute struct {
|
||||
ActivePath *ActivePath
|
||||
}
|
||||
|
||||
func (h HtmxGetRoute) Execute(c HtmxContext) {
|
||||
h.RouteFunc(c)
|
||||
}
|
||||
|
||||
func (h HtmxGetRoute) SetActivePath(activePath *ActivePath) HtmxRoute {
|
||||
h.ActivePath = activePath
|
||||
return h
|
||||
|
||||
Reference in New Issue
Block a user