diff --git a/Client/src/App.jsx b/Client/src/App.jsx
index 88e1e7019..783f28330 100644
--- a/Client/src/App.jsx
+++ b/Client/src/App.jsx
@@ -39,6 +39,7 @@ function App() {
const DetailsWithAdminProp = withAdminProp(Details);
const PageSpeedWithAdminProp = withAdminProp(PageSpeed);
const MaintenanceWithAdminProp = withAdminProp(Maintenance);
+ const SettingsWithAdminProp = withAdminProp(Settings);
const mode = useSelector((state) => state.ui.mode);
@@ -90,7 +91,7 @@ function App() {
/>
}
+ element={}
/>
{
+import PropTypes from "prop-types";
+const Settings = ({ isAdmin }) => {
const theme = useTheme();
const { user, authToken } = useSelector((state) => state.auth);
const { isLoading } = useSelector((state) => state.uptimeMonitors);
@@ -102,37 +103,39 @@ const Settings = () => {
/>
-
-
- History and monitoring
-
- Define here for how long you want to keep the data. You can also
- remove all past data.
-
-
-
- logger.warn("Disabled")}
- />
+ {isAdmin && (
+
- Clear all stats. This is irreversible.
-
+ History and monitoring
+
+ Define here for how long you want to keep the data. You can also
+ remove all past data.
+
-
-
+
+ logger.warn("Disabled")}
+ />
+
+ Clear all stats. This is irreversible.
+
+
+
+
+ )}
About
@@ -163,4 +166,7 @@ const Settings = () => {
);
};
+Settings.propTypes = {
+ isAdmin: PropTypes.bool,
+};
export default Settings;