aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/routes
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-11-07 10:44:29 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-11-07 10:47:23 +0100
commit439d7da74a577ee586dae46761e1d1e69849067b (patch)
tree9ff7c1c740e491d34df6e5ece6766d8b04474217 /src/frontend/app/routes
parentee77f38cdb324cbcf12518490df77fc9e6b89282 (diff)
Refactor StopGallery and StopGalleryItem components for improved layout and item display; update StopList to switch recent and favourite stops display order.
Diffstat (limited to 'src/frontend/app/routes')
-rw-r--r--src/frontend/app/routes/map.tsx3
-rw-r--r--src/frontend/app/routes/stoplist.tsx10
2 files changed, 6 insertions, 7 deletions
diff --git a/src/frontend/app/routes/map.tsx b/src/frontend/app/routes/map.tsx
index d3288e9..e8b3cf3 100644
--- a/src/frontend/app/routes/map.tsx
+++ b/src/frontend/app/routes/map.tsx
@@ -144,7 +144,7 @@ export default function StopMap() {
longitude: getLongitude(mapState.center),
zoom: mapState.zoom,
}}
- attributionControl={false}
+ attributionControl={{compact: false}}
maxBounds={
REGIONS[region].bounds
? [REGIONS[region].bounds!.sw, REGIONS[region].bounds!.ne]
@@ -153,7 +153,6 @@ export default function StopMap() {
>
<NavigationControl position="top-right" />
<GeolocateControl position="top-right" trackUserLocation={true} />
- <AttributionControl position="bottom-right" compact={false} />
<Source
id="stops-source"
diff --git a/src/frontend/app/routes/stoplist.tsx b/src/frontend/app/routes/stoplist.tsx
index fe6d2f1..a98b2b4 100644
--- a/src/frontend/app/routes/stoplist.tsx
+++ b/src/frontend/app/routes/stoplist.tsx
@@ -279,16 +279,16 @@ export default function StopList() {
{!loading && (
<StopGallery
- stops={recentStops.slice(0, 5)}
- title={t("stoplist.recents")}
+ stops={favouriteStops.sort((a, b) => a.stopId - b.stopId)}
+ title={t("stoplist.favourites")}
+ emptyMessage={t("stoplist.no_favourites")}
/>
)}
{!loading && (
<StopGallery
- stops={favouriteStops.sort((a, b) => a.stopId - b.stopId)}
- title={t("stoplist.favourites")}
- emptyMessage={t("stoplist.no_favourites")}
+ stops={recentStops.slice(0, 5)}
+ title={t("stoplist.recents")}
/>
)}