aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/app/components')
-rw-r--r--src/frontend/app/components/NavBar.tsx7
-rw-r--r--src/frontend/app/components/StopGalleryItem.tsx2
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 && (