From 57fa5bc08bf373aa01e2af6001597a880a685738 Mon Sep 17 00:00:00 2001 From: Jo Vandeginste Date: Mon, 6 Jan 2025 22:28:22 +0100 Subject: [PATCH] Refactor(template): Remove duplicate footer from statistics page The footer was accidentally rendered twice on the statistics page. --- assets/output.css | 4 ---- views/user/statistics.templ | 1 - views/user/statistics_templ.go | 12 ++---------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/assets/output.css b/assets/output.css index 0b17a3fa..03ba05a6 100644 --- a/assets/output.css +++ b/assets/output.css @@ -3505,10 +3505,6 @@ table { display: inline; } - .\32xl\:table-cell { - display: table-cell; - } - .\32xl\:basis-1\/3 { flex-basis: 33.333333%; } diff --git a/views/user/statistics.templ b/views/user/statistics.templ index 066e274f..1a1871b1 100644 --- a/views/user/statistics.templ +++ b/views/user/statistics.templ @@ -86,7 +86,6 @@ templ Statistics(u *database.User, since, per string) { - @partials.Footer() {{ currentUser := helpers.CurrentUser(ctx) }} {{ stats, _ := currentUser.GetStatisticsFor(since, per) }} @templ.JSONScript("stats", stats) diff --git a/views/user/statistics_templ.go b/views/user/statistics_templ.go index cdc1521a..351f11f8 100644 --- a/views/user/statistics_templ.go +++ b/views/user/statistics_templ.go @@ -302,21 +302,13 @@ func Statistics(u *database.User, since, per string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = partials.Footer().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, " ") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } currentUser := helpers.CurrentUser(ctx) stats, _ := currentUser.GetStatisticsFor(since, per) templ_7745c5c3_Err = templ.JSONScript("stats", stats).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -324,7 +316,7 @@ func Statistics(u *database.User, since, per string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, " ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, " ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }