aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/NavBar.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-11-07 12:43:18 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-11-07 12:43:18 +0100
commit4420def7411a053e930b44117e2bf63625d824dc (patch)
treebfe02088318210fe2c9a2928d6afedc39cb88e45 /src/frontend/app/components/NavBar.tsx
parent86b922c1853110981d8df985a183cb43690c575d (diff)
Make "stops" page be the home (renaming only)
Diffstat (limited to 'src/frontend/app/components/NavBar.tsx')
-rw-r--r--src/frontend/app/components/NavBar.tsx7
1 files changed, 5 insertions, 2 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