diff --git a/frontend/src/TransitPredictionsPage.js b/frontend/src/TransitPredictionsPage.js index aadde15..50b5443 100644 --- a/frontend/src/TransitPredictionsPage.js +++ b/frontend/src/TransitPredictionsPage.js @@ -92,6 +92,22 @@ export default function TransitPredictionsPage() { ); } + //set default marker icon + function maybeRenderCallButton(stopId) { + if (Number.isNaN(Number.parseInt(stopId))) { + return <> + } + return ( +
+ + CLICK TO CALL + +
+ ); + } //set default marker icon delete L.Icon.Default.prototype._getIconUrl; L.Icon.Default.mergeOptions({ @@ -155,7 +171,9 @@ export default function TransitPredictionsPage() { No predictions available at this time ) : (
- {maybeRenderCallButton(stop.id)} +
+ {maybeRenderCallButton(stop.id)} +
{stop.predictions .sort((a, b) => a.route.localeCompare(b.route)) .map((prediction, predictionIndex) => (