simpler differentiation between creating and updating
This commit is contained in:
1 parent
89a542e804
commit
2db41d331e
1 file changed
+1
-3
@@ -12,7 +12,6 @@ import { useMonitorsFetch } from "./Hooks/useMonitorsFetch";
|
|||||||
import { useCreateStatusPage } from "./Hooks/useCreateStatusPage";
|
import { useCreateStatusPage } from "./Hooks/useCreateStatusPage";
|
||||||
import { createToast } from "../../../Utils/toastUtils";
|
import { createToast } from "../../../Utils/toastUtils";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useLocation } from "react-router-dom";
|
|
||||||
import { useStatusPageFetch } from "../Status/Hooks/useStatusPageFetch";
|
import { useStatusPageFetch } from "../Status/Hooks/useStatusPageFetch";
|
||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
|
|
||||||
@@ -47,8 +46,7 @@ const CreateStatusPage = () => {
|
|||||||
const intervalRef = useRef(null);
|
const intervalRef = useRef(null);
|
||||||
|
|
||||||
// Setup
|
// Setup
|
||||||
const location = useLocation();
|
const isCreate = typeof url === "undefined";
|
||||||
const isCreate = location.pathname === "/status/uptime/create";
|
|
||||||
|
|
||||||
//Utils
|
//Utils
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|||||||
Reference in new issue
Block a user