This commit is contained in:
Eden Kirin
2024-02-01 21:50:21 +01:00
parent 725e127881
commit 15ba332ae5
6 changed files with 102 additions and 25 deletions

View File

@ -4,10 +4,10 @@ import (
"templ-tests/app/templates"
"templ-tests/app/types"
"github.com/gin-gonic/gin"
"github.com/gofiber/fiber/v2"
)
func Home(c *gin.Context) {
func Home(f *fiber.Ctx) error {
user := types.User{
FirstName: "Pero",
LastName: "Perić",
@ -18,5 +18,6 @@ func Home(c *gin.Context) {
ActivePage: "home",
User: &user,
}
templates.Home(pc).Render(c, c.Writer)
Render(f, templates.Home(pc))
return nil
}