From 23a6ea82c7be43911093ef66968b5661615aefa8 Mon Sep 17 00:00:00 2001 From: ray Date: Tue, 28 May 2024 14:35:48 -0700 Subject: [PATCH] DBC22-2253: hide Advisories route text if no route is selected --- src/frontend/src/Components/advisories/Advisories.js | 6 ++++-- src/frontend/src/pages/CamerasListPage.js | 2 +- src/frontend/src/pages/EventsListPage.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/Components/advisories/Advisories.js b/src/frontend/src/Components/advisories/Advisories.js index b3b6030d..66f9c809 100644 --- a/src/frontend/src/Components/advisories/Advisories.js +++ b/src/frontend/src/Components/advisories/Advisories.js @@ -14,7 +14,7 @@ import AdvisoriesList from './AdvisoriesList'; import './Advisories.scss'; export default function Advisories(props) { - const { advisories } = props; + const { advisories, selectedRoute } = props; return (advisories && !!advisories.length) ? (
@@ -28,7 +28,9 @@ export default function Advisories(props) { in effect -

The following advisory affects a portion of the route you’ve chosen:

+ {selectedRoute && selectedRoute.routeFound && Object.keys(selectedRoute).length !== 0 && +

The following advisory affects a portion of the route you’ve chosen:

+ }
diff --git a/src/frontend/src/pages/CamerasListPage.js b/src/frontend/src/pages/CamerasListPage.js index a1db10a3..cb1fc6fd 100644 --- a/src/frontend/src/pages/CamerasListPage.js +++ b/src/frontend/src/pages/CamerasListPage.js @@ -212,7 +212,7 @@ export default function CamerasListPage() { - +
diff --git a/src/frontend/src/pages/EventsListPage.js b/src/frontend/src/pages/EventsListPage.js index 6810a473..d640cf45 100644 --- a/src/frontend/src/pages/EventsListPage.js +++ b/src/frontend/src/pages/EventsListPage.js @@ -312,7 +312,7 @@ export default function EventsListPage() { - +
{ largeScreen &&