(no commit message provided)

This commit is contained in:
Prad Nukala
2024-07-05 22:20:13 -04:00
committed by Prad Nukala (aider)
commit 5fd43dfd6b
457 changed files with 115535 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package middleware
import (
"net/http"
"github.com/a-h/templ"
"github.com/labstack/echo/v4"
)
// Render renders a templ.Component
func Render(c echo.Context, cmp templ.Component) error {
c.Response().Writer.WriteHeader(http.StatusOK)
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML)
return cmp.Render(c.Request().Context(), c.Response())
}