Skip to content

Commit 79ee2b4

Browse files
authored
Merge pull request #1062 from WildMeOrg/1054_remove_alert_banner
remove alert banner
2 parents 9d21109 + dc3336c commit 79ee2b4

File tree

4 files changed

+2
-62
lines changed

4 files changed

+2
-62
lines changed

frontend/src/AuthenticatedSwitch.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import Home from "./pages/Home";
77
import Footer from "./components/Footer";
88
import AuthenticatedAppHeader from "./components/AuthenticatedAppHeader";
99
import useGetMe from "./models/auth/users/useGetMe";
10-
import AlertBanner from "./components/AlertBanner";
1110
import EncounterSearch from "./pages/SearchPages/EncounterSearch";
1211
import Citation from "./pages/Citation";
1312
import AdminLogs from "./pages/AdminLogs";
@@ -17,8 +16,6 @@ import ProjectList from "./pages/ProjectList";
1716
import ManualAnnotation from "./pages/ManualAnnotation";
1817

1918
export default function AuthenticatedSwitch({
20-
showAlert,
21-
setShowAlert,
2219
showclassicsubmit,
2320
showClassicEncounterSearch,
2421
}) {
@@ -39,12 +36,9 @@ export default function AuthenticatedSwitch({
3936
backgroundColor: "#303336",
4037
}}
4138
>
42-
{showAlert && <AlertBanner setShowAlert={setShowAlert} />}
4339
<AuthenticatedAppHeader
4440
username={username}
4541
avatar={avatar}
46-
showAlert={showAlert}
47-
setShowAlert={setShowAlert}
4842
showclassicsubmit={showclassicsubmit}
4943
showClassicEncounterSearch={showClassicEncounterSearch}
5044
/>

frontend/src/FrontDesk.jsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import getMergeNotifications from "./models/notifications/getMergeNotifications"
77
import getCollaborationNotifications from "./models/notifications/getCollaborationNotifications";
88
import LoadingScreen from "./components/LoadingScreen";
99
import GoogleTagManager from "./GoogleTagManager";
10-
import Cookies from "js-cookie";
1110
import "./css/scrollBar.css";
1211
import SessionWarning from "./components/SessionWarning";
1312
import {
@@ -24,9 +23,6 @@ export default function FrontDesk() {
2423
const [collaborationData, setCollaborationData] = useState([]);
2524
const [mergeData, setMergeData] = useState([]);
2625
const [count, setCount] = useState(0);
27-
const [showAlert, setShowAlert] = useState(() =>
28-
Cookies.get("showAlert") === "false" ? false : true,
29-
);
3026
const [loading, setLoading] = useState(true);
3127
const { data } = useGetSiteSettings();
3228
const showclassicsubmit = data?.showClassicSubmit;
@@ -92,8 +88,6 @@ export default function FrontDesk() {
9288
sessionCountdownTime={sessionCountdownTime}
9389
/>
9490
<AuthenticatedSwitch
95-
showAlert={showAlert}
96-
setShowAlert={setShowAlert}
9791
showclassicsubmit={showclassicsubmit}
9892
showClassicEncounterSearch={showClassicEncounterSearch}
9993
/>
@@ -109,11 +103,7 @@ export default function FrontDesk() {
109103
}}
110104
>
111105
<GoogleTagManager />
112-
<UnauthenticatedSwitch
113-
showAlert={showAlert}
114-
setShowAlert={setShowAlert}
115-
showclassicsubmit={showclassicsubmit}
116-
/>
106+
<UnauthenticatedSwitch showclassicsubmit={showclassicsubmit} />
117107
</AuthContext.Provider>
118108
);
119109
}

frontend/src/UnAuthenticatedSwitch.jsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@ import React from "react";
22
import { Routes, Route, Navigate, useLocation } from "react-router-dom";
33
import Login from "./pages/Login";
44
import Footer from "./components/Footer";
5-
import AlertBanner from "./components/AlertBanner";
65
import UnAuthenticatedAppHeader from "./components/UnAuthenticatedAppHeader";
76
import Unauthorized from "./pages/errorPages/Unauthorized";
87
import Citation from "./pages/Citation";
98
import ReportEncounter from "./pages/ReportsAndManagamentPages/ReportEncounter";
109
import ReportConfirm from "./pages/ReportsAndManagamentPages/ReportConfirm";
1110

12-
export default function UnAuthenticatedSwitch({
13-
showAlert,
14-
setShowAlert,
15-
showclassicsubmit,
16-
}) {
11+
export default function UnAuthenticatedSwitch({ showclassicsubmit }) {
1712
const [header, setHeader] = React.useState(true);
1813
const location = useLocation();
1914

@@ -32,7 +27,6 @@ export default function UnAuthenticatedSwitch({
3227
backgroundColor: "#303336",
3328
}}
3429
>
35-
{showAlert && <AlertBanner setShowAlert={setShowAlert} />}
3630
<UnAuthenticatedAppHeader showclassicsubmit={showclassicsubmit} />
3731
</div>
3832

frontend/src/components/AlertBanner.jsx

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)