diff --git a/ui/controllers/pages.go b/ui/controllers/pages.go index 17979b2..457be2a 100644 --- a/ui/controllers/pages.go +++ b/ui/controllers/pages.go @@ -25,5 +25,11 @@ func SignUpPage(c *gin.Context) { } func DashboardPage(c *gin.Context) { - c.JSON(200, gin.H{"response": "dashboard"}) + if raw, exists := c.Get(USER_OBJ_KEY); exists { + if user, ok := raw.(*models.User); ok { + renderTempl(c, templates.DashboardPage(user)) + return + } + } + renderTempl(c, templates.DashboardPage(nil)) } diff --git a/ui/templates/dashboard_page.templ b/ui/templates/dashboard_page.templ new file mode 100644 index 0000000..46bab5c --- /dev/null +++ b/ui/templates/dashboard_page.templ @@ -0,0 +1,692 @@ +package templates + +import ( + "git.preston-baxter.com/Preston_PLB/capstone/frontend-service/db/models" +) + +templ DashboardPage(user *models.User) { + + + @Head("Dashboard") +
++ + { secondaryVal } + + + { subtitle } + +
++ { key } + | + } +
---|
+ { val } + | + } +