From 9a67348a8388fdde01d242e48cb2947483f10992 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 10 Feb 2025 13:48:10 -0800 Subject: [PATCH] Update status page to use URL, no longer shows create fallback --- .../Components/ControlsHeader/index.jsx | 28 ++++++++++--- Client/src/Pages/StatusPage/Status/index.jsx | 42 +++++++++---------- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/Client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx b/Client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx index 113f0bafc..59807bf17 100644 --- a/Client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx +++ b/Client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx @@ -9,17 +9,17 @@ import { useNavigate } from "react-router-dom"; import { useLocation } from "react-router-dom"; import PropTypes from "prop-types"; -const Controls = ({ isDeleteOpen, setIsDeleteOpen, isDeleting }) => { +const Controls = ({ isDeleteOpen, setIsDeleteOpen, isDeleting, url, type }) => { const theme = useTheme(); const location = useLocation(); const currentPath = location.pathname; const navigate = useNavigate(); - if (currentPath === "/status/public") { + if (currentPath.startsWith("/status/uptime/public")) { return null; } - if (currentPath.startsWith("/distributed-uptime/status/public")) { + if (currentPath.startsWith("/status/distributed/public")) { return null; } @@ -42,7 +42,13 @@ const Controls = ({ isDeleteOpen, setIsDeleteOpen, isDeleting }) => {