diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-07 10:44:29 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-07 10:47:23 +0100 |
| commit | 439d7da74a577ee586dae46761e1d1e69849067b (patch) | |
| tree | 9ff7c1c740e491d34df6e5ece6766d8b04474217 /src/frontend/app/routes | |
| parent | ee77f38cdb324cbcf12518490df77fc9e6b89282 (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.tsx | 3 | ||||
| -rw-r--r-- | src/frontend/app/routes/stoplist.tsx | 10 |
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")} /> )} |
