From 1baf6c7ff40a9ef33c1718ae1cd38bed3512b504 Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Sun, 1 Mar 2026 21:10:18 +0100 Subject: [PATCH] (hotfix) content should no render in modal --- pkg/web/handler/task.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/web/handler/task.go b/pkg/web/handler/task.go index 62c64cd..a830839 100644 --- a/pkg/web/handler/task.go +++ b/pkg/web/handler/task.go @@ -8,7 +8,6 @@ import ( "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/web/components" "github.com/a-h/templ" - "github.com/donseba/go-htmx" ) type ValidationFeedback = models.ValidationFeedback @@ -34,7 +33,7 @@ func HandleTaskStatusModal(w http.ResponseWriter, r *http.Request) { err := components.Modal(components.ModalProps{ ID: "task-status-modal", Title: "Task Status", - Content: feedbackList(HTMX(r), taskFeedback), + Content: feedbackList(taskFeedback), Open: true, }).Render(r.Context(), w) @@ -43,11 +42,11 @@ func HandleTaskStatusModal(w http.ResponseWriter, r *http.Request) { } } -func feedbackList(hx *htmx.Handler, feedback ValidationFeedback) templ.Component { +func feedbackList(feedback ValidationFeedback) templ.Component { return templ.ComponentFunc(func(ctx context.Context, w io.Writer) error { for _, check := range feedback.Checks { if !check.Valid { - hx.WriteString(`

` + check.Message + `

`) + io.WriteString(w, `

`+check.Message+`

`) } } return nil