Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed Oct 8, 2024
2 parents e4c74f2 + 52eff39 commit efb3ad5
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions client/src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CssBaseline, Snackbar } 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";
import { UserProvider } from "contexts/userContext";
import { useEffect, useState } from "react";
import { HelmetProvider } from "react-helmet-async";
import { BrowserRouter as Router } from "react-router-dom";
import { ThemeProvider } from "theme";
Expand All @@ -18,17 +18,12 @@ function App() {
analytics.postEvent("visitAppComponent");
}, []);

const [snackbarOpen, setSnackbarOpen] = useState(false);
const [snackbarMessage, setSnackbarMessage] = useState("");
// const [snackbarOpen, setSnackbarOpen] = useState(false);
// const [snackbarMessage, setSnackbarMessage] = useState("");

const handleOpenSnackbar = (message) => {
setSnackbarMessage(message);
setSnackbarOpen(true);
};

const handleCloseSnackbar = () => {
setSnackbarOpen(false);
};
// const handleCloseSnackbar = () => {
// setSnackbarOpen(false);
// };

return (
<HelmetProvider>
Expand All @@ -46,12 +41,7 @@ function App() {
<MapProvider>
<Router>
<AppRoutes />
<SurveySnackbar
open={snackbarOpen}
autoHideDuration={6000}
onClose={handleCloseSnackbar}
message={snackbarMessage}
/>
<SurveySnackbar />
</Router>
</MapProvider>
</ThemeProvider>
Expand Down

0 comments on commit efb3ad5

Please sign in to comment.