diff --git a/src/components/FeaturePanel/PublicTransport/route/Stops.tsx b/src/components/FeaturePanel/PublicTransport/route/Stops.tsx index d80798277..e731c1513 100644 --- a/src/components/FeaturePanel/PublicTransport/route/Stops.tsx +++ b/src/components/FeaturePanel/PublicTransport/route/Stops.tsx @@ -48,11 +48,15 @@ export const Stops = ({ stops, stopCount, onExpand, onCollapse }: Props) => { {stops.map((stop, i) => ( <> - + {stop.tags.name} {i === 0 && ( - + { type ItemProps = { isFirst?: boolean; isLast?: boolean; - showCircle?: boolean; + stopFeature?: Feature; }; export const StationItem: React.FC = ({ children, + stopFeature, isFirst = false, isLast = false, - showCircle = true, }) => { - const { feature } = useFeatureContext(); + const { feature, setPreview } = useFeatureContext(); const { currentTheme } = useUserThemeContext(); const color = getBgColor(feature.tags.colour, currentTheme === 'dark'); + return (
  • = ({ color={color} isFirst={isFirst} isLast={isLast} - showCircle={showCircle} + showCircle={!!stopFeature} />
    setPreview(stopFeature)} + onMouseLeave={() => setPreview(null)} style={{ padding: '0.5rem 0', }}