From 0959ddd6bc28f0d1e494d23fdc3a75cedff4580f Mon Sep 17 00:00:00 2001 From: John Darragh Date: Thu, 16 Jan 2025 17:09:48 -0800 Subject: [PATCH] 2317 fire warning (#2325) * Add LA Fire warning * Implement temporary warning message --- client/src/App.jsx | 31 ++----------------- client/src/components/FoodSeeker/Home.jsx | 5 +++ client/src/components/Layout/Header.jsx | 10 ++++-- client/src/components/Layout/WidgetFooter.jsx | 21 ++++++++----- client/src/hooks/useLocationHook.js | 4 ++- 5 files changed, 31 insertions(+), 40 deletions(-) diff --git a/client/src/App.jsx b/client/src/App.jsx index 65bac828d..cfdabf6ca 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -1,5 +1,5 @@ -import { useEffect, useState } from "react"; -import { CssBaseline, Alert, Snackbar, Stack } from "@mui/material"; +import { useEffect } from "react"; +import { CssBaseline } from "@mui/material"; import SurveySnackbar from "./components/UI/SurveySnackbar"; import { SiteProvider } from "./contexts/siteContext"; import { ToasterProvider } from "contexts/toasterContext"; @@ -36,8 +36,6 @@ function App() { /> - - {hasUserFeedbackSuveyFeatureFlag && } @@ -52,28 +50,3 @@ function App() { } export default App; - -function LAFireWarning() { - const [snackbarOpen, setSnackbarOpen] = useState(true); - - return ( - - setSnackbarOpen(false)} - anchorOrigin={{ - vertical: "bottom", - horizontal: "right", - }} - > - setSnackbarOpen(false)} - severity="warning" - sx={{ width: "100%" }} - > - Due to the LA Fires (Jan 2025), some information may be out-of-date. - - - - ); -} diff --git a/client/src/components/FoodSeeker/Home.jsx b/client/src/components/FoodSeeker/Home.jsx index 50043c964..bf01f54e1 100644 --- a/client/src/components/FoodSeeker/Home.jsx +++ b/client/src/components/FoodSeeker/Home.jsx @@ -1,5 +1,6 @@ import { LocationOn } from "@mui/icons-material"; import { + Alert, Box, Button, CircularProgress, @@ -226,6 +227,10 @@ const Home = () => { )} + + Due to the LA Fires (Jan 2025), some information may be + out-of-date. + + {isMapPage ? ( + + Due to the LA Fires (Jan 2025), some information may be + out-of-date. + + ) : null} {captionText} - + {maintainers.map((maintainer) => { const logoMaintainerPath = maintainer.path; const imageType = logoMaintainerPath @@ -194,12 +194,17 @@ function WidgetFooter() { boxShadow: "none", })} > - +
+ + + Due to the LA Fires (Jan 2025), some information may be out-of-date. + +
{ setIsHomePage(location.pathname === "/"); setIsAuthPage(match && match.isExact ? true : false); + setIsMapPage(location.pathname.toLowerCase().includes("organizations")); }, [location, match]); - return { isHomePage, isAuthPage }; + return { isHomePage, isAuthPage, isMapPage }; }