Request object

This commit is contained in:
Eden Kirin
2024-02-06 16:21:00 +01:00
parent 75cded4054
commit 4d9759c093
17 changed files with 194 additions and 1210 deletions

View File

@ -10,7 +10,11 @@ import "context"
import "io"
import "bytes"
func Home(pc PageContext) templ.Component {
import (
"fiber-sessions/app/router/requests"
)
func Home(request *requests.Request, pc PageContext) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@ -83,7 +87,7 @@ func Home(pc PageContext) templ.Component {
}
return templ_7745c5c3_Err
})
templ_7745c5c3_Err = baseLayout(pc).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
templ_7745c5c3_Err = baseLayout(request, pc).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}