Your files, always within reach.
@@ -168,32 +111,7 @@ templ content(title string, user types.User) {
diff --git a/handler/user/user.go b/handler/user/user.go index 755ae78..39e4ea8 100644 --- a/handler/user/user.go +++ b/handler/user/user.go @@ -17,7 +17,7 @@ func init() { func GET(w http.ResponseWriter, r *http.Request) { userSession := r.Context().Value("user").(types.User) - component := userView.Main("User Page", userSession.Email, userSession.Username, session.GetSessions(userSession.Email)) + component := userView.Main("User Page", userSession, session.GetSessions(userSession.Email)) err := component.Render(r.Context(), w) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) diff --git a/view/index/index.templ b/view/index/index.templ index 64c81c3..c5b3e47 100644 --- a/view/index/index.templ +++ b/view/index/index.templ @@ -8,64 +8,7 @@ import ( templ content(title string, user types.User) { @layout.Base(title){
@@ -168,32 +111,7 @@ templ content(title string, user types.User) {