Added account page with subpage select

This commit is contained in:
2025-02-14 23:15:51 +11:00
parent ea4dd2a407
commit d53114cc20
6 changed files with 117 additions and 2 deletions

25
handlers/account.go Normal file
View File

@@ -0,0 +1,25 @@
package handlers
import (
"net/http"
"projectreshoot/view/component/account"
"projectreshoot/view/page"
)
func HandleAccountPage() http.Handler {
return http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
page.Account("General").Render(r.Context(), w)
},
)
}
func HandleAccountSubpage() http.Handler {
return http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
r.ParseForm()
subpage := r.FormValue("subpage")
account.AccountContent(subpage).Render(r.Context(), w)
},
)
}