rename hook, use correct hook

This commit is contained in:
Alex Holliday committed 2025-02-24 15:56:00 -08:00
1 parent aea2977f62
commit 08af15f8a5
3 files changed
+6 -6

No files matched your search

@@ -19,7 +19,7 @@ import { buildErrors } from "../../../Validation/error";
import { createToast } from "../../../Utils/toastUtils"; import { createToast } from "../../../Utils/toastUtils";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useMonitorsFetch } from "../../StatusPage/Create/Hooks/useMonitorsFetch"; import { useMonitorsFetch } from "../../StatusPage/Create/Hooks/useMonitorsFetch";
import { useStatusPageFetchByUrl } from "../Status/Hooks/useStatusPageFetchByUrl"; import { useDUStatusPageFetchByUrl } from "../Status/Hooks/useDUStatusPageFetchByUrl";
const CreateStatus = () => { const CreateStatus = () => {
const theme = useTheme(); const theme = useTheme();
@@ -30,7 +30,7 @@ const CreateStatus = () => {
const [createStatusPage, isLoading, networkError] = useCreateStatusPage(isCreate); const [createStatusPage, isLoading, networkError] = useCreateStatusPage(isCreate);
const [statusPageIsLoading, statusPageNetworkError, statusPage, _, isPublished] = const [statusPageIsLoading, statusPageNetworkError, statusPage, _, isPublished] =
useStatusPageFetchByUrl({ useDUStatusPageFetchByUrl({
url, url,
timeFrame: 30, timeFrame: 30,
}); });
@@ -5,7 +5,7 @@ import { useSelector } from "react-redux";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import { useMonitorUtils } from "../../../../Hooks/useMonitorUtils"; import { useMonitorUtils } from "../../../../Hooks/useMonitorUtils";
const useStatusPageFetchByUrl = ({ url, timeFrame }) => { const useDUStatusPageFetchByUrl = ({ url, timeFrame }) => {
const [isLoading, setIsLoading] = useState(true); const [isLoading, setIsLoading] = useState(true);
const [networkError, setNetworkError] = useState(false); const [networkError, setNetworkError] = useState(false);
const [statusPage, setStatusPage] = useState(undefined); const [statusPage, setStatusPage] = useState(undefined);
@@ -54,4 +54,4 @@ const useStatusPageFetchByUrl = ({ url, timeFrame }) => {
return [isLoading, networkError, statusPage, monitorId, isPublished]; return [isLoading, networkError, statusPage, monitorId, isPublished];
}; };
export { useStatusPageFetchByUrl }; export { useDUStatusPageFetchByUrl };
@@ -24,7 +24,7 @@ import { useTheme } from "@mui/material/styles";
import { useState, useRef } from "react"; import { useState, useRef } from "react";
import { useParams } from "react-router-dom"; import { useParams } from "react-router-dom";
import { useSubscribeToDetails } from "../../DistributedUptime/Details/Hooks/useSubscribeToDetails"; 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 { useStatusPageDelete } from "../../StatusPage/Status/Hooks/useStatusPageDelete";
import TimeFrameHeader from "./Components/TimeframeHeader"; import TimeFrameHeader from "./Components/TimeframeHeader";
import SubHeader from "../../../Components/Subheader"; import SubHeader from "../../../Components/Subheader";
@@ -53,7 +53,7 @@ const DistributedUptimeStatus = () => {
statusPage, statusPage,
monitorId, monitorId,
isPublished, isPublished,
] = useStatusPageFetchByUrl({ ] = useDUStatusPageFetchByUrl({
url, url,
timeFrame, timeFrame,
}); });