diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-07 12:43:18 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-07 12:43:18 +0100 |
| commit | 4420def7411a053e930b44117e2bf63625d824dc (patch) | |
| tree | bfe02088318210fe2c9a2928d6afedc39cb88e45 /src/frontend/app/components | |
| parent | 86b922c1853110981d8df985a183cb43690c575d (diff) | |
Make "stops" page be the home (renaming only)
Diffstat (limited to 'src/frontend/app/components')
| -rw-r--r-- | src/frontend/app/components/NavBar.tsx | 7 | ||||
| -rw-r--r-- | src/frontend/app/components/StopGalleryItem.tsx | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/frontend/app/components/NavBar.tsx b/src/frontend/app/components/NavBar.tsx index 6a06e63..bb73d58 100644 --- a/src/frontend/app/components/NavBar.tsx +++ b/src/frontend/app/components/NavBar.tsx @@ -27,7 +27,8 @@ export default function NavBar() { { name: t("navbar.stops", "Paradas"), icon: MapPin, - path: "/stops", + path: "/", + exact: true }, { name: t("navbar.map", "Mapa"), @@ -65,7 +66,9 @@ export default function NavBar() { <nav className="navigation-bar"> {navItems.map((item) => { const Icon = item.icon; - const isActive = location.pathname.startsWith(item.path); + const isActive = item.exact ? + location.pathname === item.path : + location.pathname.startsWith(item.path); return ( <Link diff --git a/src/frontend/app/components/StopGalleryItem.tsx b/src/frontend/app/components/StopGalleryItem.tsx index 0af14bc..b32661a 100644 --- a/src/frontend/app/components/StopGalleryItem.tsx +++ b/src/frontend/app/components/StopGalleryItem.tsx @@ -23,7 +23,7 @@ const StopGalleryItem: React.FC<StopGalleryItemProps> = ({ stop }) => { {StopDataProvider.getDisplayName(region, stop)} </div> <div className="gallery-item-lines"> - {stop.lines?.slice(0, 6).map((line) => ( + {stop.lines?.slice(0, 5).map((line) => ( <LineIcon key={line} line={line} region={region} /> ))} {stop.lines && stop.lines.length > 5 && ( |
