diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-30 20:50:47 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2026-01-30 20:50:47 +0100 |
| commit | a424add8f2b396b1d68db549359e88a15ed624b5 (patch) | |
| tree | 4a6118f7d9a6dfb9230d10dcdd729a81ff11e62a /src/frontend/app/routes | |
| parent | bb6366af0c07116ecb54144dca129f099127d4c3 (diff) | |
feat: Add link to view stop details in route details page
Diffstat (limited to 'src/frontend/app/routes')
| -rw-r--r-- | src/frontend/app/routes/routes-$id.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/frontend/app/routes/routes-$id.tsx b/src/frontend/app/routes/routes-$id.tsx index 6fe0424..f7c69d7 100644 --- a/src/frontend/app/routes/routes-$id.tsx +++ b/src/frontend/app/routes/routes-$id.tsx @@ -16,7 +16,7 @@ import { Source, type MapRef, } from "react-map-gl/maplibre"; -import { useParams } from "react-router"; +import { Link, useParams } from "react-router"; import { fetchRouteDetails } from "~/api/transit"; import { AppMap } from "~/components/shared/AppMap"; import { @@ -538,6 +538,15 @@ export default function RouteDetailsPage() { )} </p> + {selectedStopId === stop.id && ( + <Link + to={`/stops/${stop.id}`} + className="mt-1 inline-flex items-center text-xs font-semibold text-primary hover:underline" + > + {t("routes.view_stop", "Ver parada")} + </Link> + )} + {selectedStopId === stop.id && stop.scheduledDepartures.length > 0 && ( <div className="mt-2 flex flex-wrap gap-1"> |
