refactor: change template generation from go-elem to templ and clean up the repository

This commit is contained in:
Patryk Hegenberg 2024-11-27 09:38:26 +01:00
parent f6b6f81826
commit a3dc4eddfa
19 changed files with 842 additions and 874 deletions

16
controllers/create.go Normal file
View file

@ -0,0 +1,16 @@
package controllers
import (
"context"
"echoTest/models"
"echoTest/templates"
"io"
"github.com/a-h/templ"
)
func (c *Controller) CreateBewertungNode(bewertung models.Bewertung) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) error {
return templates.BewertungenTable([]models.Bewertung{bewertung}).Render(ctx, w)
})
}