diff --git a/examples/htmx-fiber-todo/main.go b/examples/htmx-fiber-todo/main.go index dc0d00f..9320eaa 100644 --- a/examples/htmx-fiber-todo/main.go +++ b/examples/htmx-fiber-todo/main.go @@ -143,15 +143,11 @@ func renderTodos(todos []Todo) string { ), elem.Ul( attrs.Props{attrs.Style: listContainerStyle.ToInline()}, - renderTodoItems(todos)..., + elem.TransformEach(todos, createTodoNode)..., ), ) - + htmlContent := elem.Html(nil, headContent, bodyContent) return htmlContent.Render() } - -func renderTodoItems(todos []Todo) []elem.Node { - return elem.TransformEach(todos, createTodoNode) -}