rename hook, use correct hook
This commit is contained in:
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 { 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,
|
||||
});
|
||||
|
||||
+2
-2
@@ -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 };
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user