diff --git a/Client/package-lock.json b/Client/package-lock.json index 44e276f63..2f1543bba 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -18,7 +18,7 @@ "@mui/x-data-grid": "7.3.2", "@mui/x-date-pickers": "7.3.2", "@reduxjs/toolkit": "2.2.5", - "axios": "1.7.4", + "axios": "^1.7.4", "chart.js": "^4.4.3", "dayjs": "1.11.11", "joi": "17.13.1", diff --git a/Client/package.json b/Client/package.json index 769e1f4a6..22f15f7f9 100644 --- a/Client/package.json +++ b/Client/package.json @@ -20,7 +20,7 @@ "@mui/x-data-grid": "7.3.2", "@mui/x-date-pickers": "7.3.2", "@reduxjs/toolkit": "2.2.5", - "axios": "1.7.4", + "axios": "^1.7.4", "chart.js": "^4.4.3", "dayjs": "1.11.11", "joi": "17.13.1", diff --git a/Client/src/App.jsx b/Client/src/App.jsx index 12db9dab9..fbbc583ad 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -7,7 +7,7 @@ import Login from "./Pages/Auth/Login"; import Register from "./Pages/Auth/Register/Register"; import HomeLayout from "./Layouts/HomeLayout"; import Account from "./Pages/Account"; -import Monitors from "./Pages/Monitors"; +import Monitors from "./Pages/Monitors/Home"; import CreateMonitor from "./Pages/Monitors/CreateMonitor"; import Incidents from "./Pages/Incidents"; import Status from "./Pages/Status"; @@ -21,6 +21,7 @@ import ProtectedRoute from "./Components/ProtectedRoute"; import Details from "./Pages/Monitors/Details"; import Maintenance from "./Pages/Maintenance"; import withAdminCheck from "./HOC/withAdminCheck"; +import withAdminProp from "./HOC/withAdminProp"; import Configure from "./Pages/Monitors/Configure"; import PageSpeed from "./Pages/PageSpeed"; import CreatePageSpeed from "./Pages/PageSpeed/CreatePageSpeed"; @@ -30,6 +31,9 @@ import PageSpeedConfigure from "./Pages/PageSpeed/Configure"; function App() { const AdminCheckedRegister = withAdminCheck(Register); + const MonitorsWithAdminProp = withAdminProp(Monitors); + const DetailsWithAdminProp = withAdminProp(Details); + const PageSpeedWithAdminProp = withAdminProp(PageSpeed); return ( <> @@ -37,11 +41,11 @@ function App() { } + element={} /> } + element={} /> } + element={} /> } + element={} /> { +const Fallback = ({ title, checks, link = "/", isAdmin }) => { const theme = useTheme(); const navigate = useNavigate(); @@ -40,7 +40,7 @@ const Fallback = ({ title, checks, link = "/" }) => { marginY={theme.spacing(6)} color={theme.palette.text.secondary} > - A {title} is used to: + A {title} monitor is used to: {checks.map((check, index) => ( { /> ))} -