diff --git a/frontend/src/Components/RouteCard.js b/frontend/src/Components/RouteCard.js index 9bc446e..fd1e2d6 100644 --- a/frontend/src/Components/RouteCard.js +++ b/frontend/src/Components/RouteCard.js @@ -10,14 +10,19 @@ export default function RouteCard({ route, destinations, useDestinationAsName }) {Object.entries(destinations).map(([destination, times ]) => (
-
-
- {route} - {useDestinationAsName ? null : ( - to {destination} - )} +
+
+
+ {route} + {useDestinationAsName ? null : ( + <> + + {destination} + + )} +
- + {times.map((time, timeIndex) => ( {formatDateToTime(time)} {timeIndex !== times.length - 1 && ', '} diff --git a/frontend/src/TransitPredictionsPage.js b/frontend/src/TransitPredictionsPage.js index aadde15..ce03b5a 100644 --- a/frontend/src/TransitPredictionsPage.js +++ b/frontend/src/TransitPredictionsPage.js @@ -2,11 +2,6 @@ import React, { useState, useEffect } from 'react'; import { getTransitPredictions } from './APIFunctions/SCEta'; import { formatDateToTime } from './util/formatDateToTime'; import RouteCard from './Components/RouteCard'; -import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'; -import 'leaflet/dist/leaflet.css'; -import L from 'leaflet'; -import markerIcon from 'leaflet/dist/images/marker-icon.png'; -import markerShadow from 'leaflet/dist/images/marker-shadow.png'; export default function TransitPredictionsPage() { const [error, setError] = useState(); @@ -76,29 +71,6 @@ export default function TransitPredictionsPage() { window.location.hash = encode(newStop) }; - function maybeRenderCallButton(stopId) { - if (Number.isNaN(Number.parseInt(stopId))) { - return <> - } - return ( - - ); - } - - //set default marker icon - delete L.Icon.Default.prototype._getIconUrl; - L.Icon.Default.mergeOptions({ - iconRetinaUrl: markerIcon, - iconUrl: markerIcon, - shadowUrl: markerShadow, - }); if (error) { return ( @@ -127,7 +99,7 @@ export default function TransitPredictionsPage() { {/* Dropdown for smaller screens */}