This commit is contained in:
Eden Kirin
2024-02-02 20:23:57 +01:00
parent 8b1c9d02c5
commit fbcf87118d
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"github.com/gofiber/fiber/v2/middleware/adaptor"
)
// example taken from https://github.com/a-h/templ/tree/main/examples/integration-gofiber
func Render(c *fiber.Ctx, component templ.Component, options ...func(*templ.ComponentHandler)) error {
componentHandler := templ.Handler(component)
for _, o := range options {