diff --git a/src/pages/components/map-related/MapLayers/BusToolTip.tsx b/src/pages/components/map-related/MapLayers/BusToolTip.tsx index 781d0c44..d0efbdee 100644 --- a/src/pages/components/map-related/MapLayers/BusToolTip.tsx +++ b/src/pages/components/map-related/MapLayers/BusToolTip.tsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react' +import { Link } from 'react-router-dom' import { Point } from 'src/pages/realtimeMap' import { Button } from '@mui/material' import moment from 'moment-timezone' @@ -28,9 +29,10 @@ export function BusToolTip({ position, icon }: BusToolTipProps) { .then((siriRideRes: SiriRideWithRelatedPydanticModel) => setSiriRide(siriRideRes)) .finally(() => setIsLoading(false)) }, [position]) + return (
- {isLoading ? ( + {isLoading || !siriRide ? ( <> {t('loading_routes')} @@ -39,18 +41,21 @@ export function BusToolTip({ position, icon }: BusToolTipProps) { <>

- {t('line')} :{siriRide && siriRide.gtfsRouteRouteShortName} + {t('line')} : + + + {siriRide.gtfsRouteRouteShortName} + +

bus icon