From 3e1c6f9c0056c488f51dc2e13d6ddf5365adb312 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 16 Aug 2026 11:24:45 +0200 Subject: refactor(web): derive climb display groups --- web/templates.templ | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'web/templates.templ') diff --git a/web/templates.templ b/web/templates.templ index 9f57696..1decad5 100644 --- a/web/templates.templ +++ b/web/templates.templ @@ -79,13 +79,13 @@ templ RideDetailContent(data RideDetailView) { if data.HasRoute { - if len(data.Profile.OfficialClimbs) > 0 { + if len(data.Profile.OfficialClimbs()) > 0 {

Official climbs

- for _, climb := range data.Profile.OfficialClimbs { + for _, climb := range data.Profile.OfficialClimbs() {
Climb { formatClimbNumber(climb.Index) }{ climb.OfficialName } @@ -112,20 +112,20 @@ templ RideDetailContent(data RideDetailView) {
} -
- if len(data.Profile.UnmatchedClimbs) > 0 { +
+ if len(data.Profile.UnmatchedClimbs()) > 0 {

Next steps

Climbs to match

- { formatClimbCount(len(data.Profile.UnmatchedClimbs)) } + { formatClimbCount(len(data.Profile.UnmatchedClimbs())) }
- for _, climb := range data.Profile.UnmatchedClimbs { + for _, climb := range data.Profile.UnmatchedClimbs() {
Climb { formatClimbNumber(climb.Index) }{ climb.Name } -- cgit v1.2.3