From 08af15f8a5c7b6ebb4d18661cfe108d53d816291 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 24 Feb 2025 15:56:00 -0800 Subject: [PATCH] rename hook, use correct hook --- src/Pages/DistributedUptimeStatus/Create/index.jsx | 4 ++-- ...StatusPageFetchByUrl.jsx => useDUStatusPageFetchByUrl.jsx} | 4 ++-- src/Pages/DistributedUptimeStatus/Status/index.jsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/Pages/DistributedUptimeStatus/Status/Hooks/{useStatusPageFetchByUrl.jsx => useDUStatusPageFetchByUrl.jsx} (94%) diff --git a/src/Pages/DistributedUptimeStatus/Create/index.jsx b/src/Pages/DistributedUptimeStatus/Create/index.jsx index e1e63bfa4..d658b4cff 100644 --- a/src/Pages/DistributedUptimeStatus/Create/index.jsx +++ b/src/Pages/DistributedUptimeStatus/Create/index.jsx @@ -19,7 +19,7 @@ import { buildErrors } from "../../../Validation/error"; import { createToast } from "../../../Utils/toastUtils"; import { useNavigate } from "react-router-dom"; import { useMonitorsFetch } from "../../StatusPage/Create/Hooks/useMonitorsFetch"; -import { useStatusPageFetchByUrl } from "../Status/Hooks/useStatusPageFetchByUrl"; +import { useDUStatusPageFetchByUrl } from "../Status/Hooks/useDUStatusPageFetchByUrl"; const CreateStatus = () => { const theme = useTheme(); @@ -30,7 +30,7 @@ const CreateStatus = () => { const [createStatusPage, isLoading, networkError] = useCreateStatusPage(isCreate); const [statusPageIsLoading, statusPageNetworkError, statusPage, _, isPublished] = - useStatusPageFetchByUrl({ + useDUStatusPageFetchByUrl({ url, timeFrame: 30, }); diff --git a/src/Pages/DistributedUptimeStatus/Status/Hooks/useStatusPageFetchByUrl.jsx b/src/Pages/DistributedUptimeStatus/Status/Hooks/useDUStatusPageFetchByUrl.jsx similarity index 94% rename from src/Pages/DistributedUptimeStatus/Status/Hooks/useStatusPageFetchByUrl.jsx rename to src/Pages/DistributedUptimeStatus/Status/Hooks/useDUStatusPageFetchByUrl.jsx index 61c4f1b65..8ceb8f611 100644 --- a/src/Pages/DistributedUptimeStatus/Status/Hooks/useStatusPageFetchByUrl.jsx +++ b/src/Pages/DistributedUptimeStatus/Status/Hooks/useDUStatusPageFetchByUrl.jsx @@ -5,7 +5,7 @@ import { useSelector } from "react-redux"; import { useTheme } from "@emotion/react"; import { useMonitorUtils } from "../../../../Hooks/useMonitorUtils"; -const useStatusPageFetchByUrl = ({ url, timeFrame }) => { +const useDUStatusPageFetchByUrl = ({ url, timeFrame }) => { const [isLoading, setIsLoading] = useState(true); const [networkError, setNetworkError] = useState(false); const [statusPage, setStatusPage] = useState(undefined); @@ -54,4 +54,4 @@ const useStatusPageFetchByUrl = ({ url, timeFrame }) => { return [isLoading, networkError, statusPage, monitorId, isPublished]; }; -export { useStatusPageFetchByUrl }; +export { useDUStatusPageFetchByUrl }; diff --git a/src/Pages/DistributedUptimeStatus/Status/index.jsx b/src/Pages/DistributedUptimeStatus/Status/index.jsx index f9a2cb2b4..c904f31ee 100644 --- a/src/Pages/DistributedUptimeStatus/Status/index.jsx +++ b/src/Pages/DistributedUptimeStatus/Status/index.jsx @@ -24,7 +24,7 @@ import { useTheme } from "@mui/material/styles"; import { useState, useRef } from "react"; import { useParams } from "react-router-dom"; import { useSubscribeToDetails } from "../../DistributedUptime/Details/Hooks/useSubscribeToDetails"; -import { useStatusPageFetchByUrl } from "./Hooks/useStatusPageFetchByUrl"; +import { useDUStatusPageFetchByUrl } from "./Hooks/useDUStatusPageFetchByUrl"; import { useStatusPageDelete } from "../../StatusPage/Status/Hooks/useStatusPageDelete"; import TimeFrameHeader from "./Components/TimeframeHeader"; import SubHeader from "../../../Components/Subheader"; @@ -53,7 +53,7 @@ const DistributedUptimeStatus = () => { statusPage, monitorId, isPublished, - ] = useStatusPageFetchByUrl({ + ] = useDUStatusPageFetchByUrl({ url, timeFrame, });