diff --git a/lib/actions/ui.js b/lib/actions/ui.js index 0e3c9b97d..7be1c9fc1 100644 --- a/lib/actions/ui.js +++ b/lib/actions/ui.js @@ -178,7 +178,8 @@ export function setViewedStop(payload, viewer = 'nearby') { dispatch(setViewedNearbyCoords(payload)) } else { dispatch(viewStop(payload)) - const path = getPathFromParts('stop', payload.id) + const path = getPathFromParts('stop', payload.stopId) + console.log(path) if (payload) dispatch(routeTo(path)) } } @@ -240,7 +241,7 @@ export function matchContentToUrl(map, location) { break case 'stop': if (id) { - dispatch(setViewedStop({ stopId: id })) + dispatch(setViewedStop({ stopId: id }, 'stop')) } else { dispatch(setViewedStop(null)) dispatch(setMainPanelContent(MainPanelContent.STOP_VIEWER)) diff --git a/lib/components/viewers/nearby/stop.tsx b/lib/components/viewers/nearby/stop.tsx index 6fa252d8b..c2d67b4e0 100644 --- a/lib/components/viewers/nearby/stop.tsx +++ b/lib/components/viewers/nearby/stop.tsx @@ -12,6 +12,7 @@ import React from 'react' import * as mapActions from '../../../actions/map' import * as uiActions from '../../../actions/ui' +import { Calendar } from '@styled-icons/fa-solid' import { Card, @@ -34,6 +35,7 @@ type PatternStopTime = { type StopData = Place & { code: string + gtfsId: string stoptimesForPatterns: PatternStopTime[] } @@ -64,6 +66,7 @@ const getTimezoneWarning = (homeTimezone: string): JSX.Element => { type Props = { homeTimezone: string setLocation: (args: any) => void + setViewedStop: (stop: any, nearby: string) => void showOperatorLogo: boolean stopData: StopData zoomToPlace: (map: any, stopData: any) => void @@ -72,6 +75,7 @@ type Props = { const Stop = ({ homeTimezone, setLocation, + setViewedStop, stopData, zoomToPlace }: Props): JSX.Element => { @@ -147,6 +151,15 @@ const Stop = ({ > +