diff --git a/internal/api/handler.go b/internal/api/handler.go
index 92d5c96..19cf657 100644
--- a/internal/api/handler.go
+++ b/internal/api/handler.go
@@ -13,7 +13,7 @@ import (
"github.com/tarow/skat-counter/internal/skat"
"github.com/tarow/skat-counter/internal/skat/gen/model"
template "github.com/tarow/skat-counter/templates"
- "github.com/tarow/skat-counter/templates/components"
+ component "github.com/tarow/skat-counter/templates/components"
)
type Handler struct {
@@ -99,7 +99,7 @@ func (h Handler) GetEditGameForm(c echo.Context) error {
return err
}
- form := components.EditGameForm(*game)
+ form := component.EditGameForm(*game)
return render(c, http.StatusOK, form)
}
@@ -134,7 +134,7 @@ func (h Handler) EditGame(c echo.Context) error {
}
func (h Handler) GetCreateGameForm(c echo.Context) error {
- form := components.CreateGameForm()
+ form := component.CreateGameForm()
return render(c, http.StatusOK, form)
}
@@ -203,7 +203,7 @@ func (h Handler) GetEditRoundForm(c echo.Context) error {
}
}
- form := components.EditRoundForm(*game, round, roundIdx)
+ form := component.EditRoundForm(*game, round, roundIdx)
return render(c, http.StatusOK, form)
}
diff --git a/templates/GameDetails.templ b/templates/GameDetails.templ
index 7c26015..e8e4a23 100644
--- a/templates/GameDetails.templ
+++ b/templates/GameDetails.templ
@@ -18,10 +18,10 @@ templ GameDetails (game skat.Game) {
@GameDetailsNavbar()
- @components.RoundsList(game)
+ @component.RoundsList(game)
- @components.GameCard(game, false, true, true)
- @components.AddRoundForm(game)
+ @component.GameCard(game, false, true, true)
+ @component.AddRoundForm(game)
diff --git a/templates/GameDetails_templ.go b/templates/GameDetails_templ.go
index 442d4f5..d1b086c 100644
--- a/templates/GameDetails_templ.go
+++ b/templates/GameDetails_templ.go
@@ -73,7 +73,7 @@ func GameDetails(game skat.Game) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = components.RoundsList(game).Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = component.RoundsList(game).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -81,11 +81,11 @@ func GameDetails(game skat.Game) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = components.GameCard(game, false, true, true).Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = component.GameCard(game, false, true, true).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = components.AddRoundForm(game).Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = component.AddRoundForm(game).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/templates/GameOverview.templ b/templates/GameOverview.templ
index 5d2ea2d..974eacc 100644
--- a/templates/GameOverview.templ
+++ b/templates/GameOverview.templ
@@ -27,6 +27,6 @@ templ GameOverviewNavbar() {
templ GameOverview(games []skat.Game) {
@Base() {
@GameOverviewNavbar()
- @components.GameList(games)
+ @component.GameList(games)
}
}
diff --git a/templates/GameOverview_templ.go b/templates/GameOverview_templ.go
index 969888d..5fed6e1 100644
--- a/templates/GameOverview_templ.go
+++ b/templates/GameOverview_templ.go
@@ -82,7 +82,7 @@ func GameOverview(games []skat.Game) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- templ_7745c5c3_Err = components.GameList(games).Render(ctx, templ_7745c5c3_Buffer)
+ templ_7745c5c3_Err = component.GameList(games).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/templates/components/create_game_form.templ b/templates/components/create_game_form.templ
index 42b5cbd..876f29e 100644
--- a/templates/components/create_game_form.templ
+++ b/templates/components/create_game_form.templ
@@ -1,4 +1,4 @@
-package components
+package component
templ CreateGameForm() {