remove authToken reading and passing in UI component and hooks

This commit is contained in:
dongfang committed 2025-02-18 04:56:26 +00:00
1 parent 6a1e5532e4
commit f2ae99768a
41 files changed
+76 -135

No files matched your search

@@ -9,12 +9,10 @@ const useStatusPageFetchByUrl = ({ url }) => {
const [statusPage, setStatusPage] = useState(undefined);
const [monitorId, setMonitorId] = useState(undefined);
const [isPublished, setIsPublished] = useState(false);
const { authToken } = useSelector((state) => state.auth);
useEffect(() => {
const fetchStatusPageByUrl = async () => {
try {
const response = await networkService.getStatusPageByUrl({
authToken,
url,
type: "distributed",
});
@@ -33,7 +31,7 @@ const useStatusPageFetchByUrl = ({ url }) => {
}
};
fetchStatusPageByUrl();
}, [authToken, url]);
}, [url]);
return [isLoading, networkError, statusPage, monitorId, isPublished];
};