From 2db41d331e09743b141cbc3ade1858654c687925 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 12 Feb 2025 13:46:09 -0800 Subject: [PATCH] simpler differentiation between creating and updating --- Client/src/Pages/StatusPage/Create/index.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Client/src/Pages/StatusPage/Create/index.jsx b/Client/src/Pages/StatusPage/Create/index.jsx index f54189fe8..22bdaa3e2 100644 --- a/Client/src/Pages/StatusPage/Create/index.jsx +++ b/Client/src/Pages/StatusPage/Create/index.jsx @@ -12,7 +12,6 @@ import { useMonitorsFetch } from "./Hooks/useMonitorsFetch"; import { useCreateStatusPage } from "./Hooks/useCreateStatusPage"; import { createToast } from "../../../Utils/toastUtils"; import { useNavigate } from "react-router-dom"; -import { useLocation } from "react-router-dom"; import { useStatusPageFetch } from "../Status/Hooks/useStatusPageFetch"; import { useParams } from "react-router-dom"; @@ -47,8 +46,7 @@ const CreateStatusPage = () => { const intervalRef = useRef(null); // Setup - const location = useLocation(); - const isCreate = location.pathname === "/status/uptime/create"; + const isCreate = typeof url === "undefined"; //Utils const theme = useTheme();