diff --git a/client/src/Pages/Uptime/Details/index.tsx b/client/src/Pages/Uptime/Details/index.tsx index 061c4e0b1..5f6d347b1 100644 --- a/client/src/Pages/Uptime/Details/index.tsx +++ b/client/src/Pages/Uptime/Details/index.tsx @@ -60,7 +60,7 @@ const UptimeDetailsPage = () => { } = useGet( monitorDetailsUrl, {}, - { refreshInterval: 10000, keepPreviousData: true } + { refreshInterval: 10000, keepPreviousData: true, revalidateOnFocus: false } ); const monitorData = monitorDetailsData?.monitorData; @@ -75,7 +75,11 @@ const UptimeDetailsPage = () => { return `/monitors/certificate/${monitorId}`; }, [monitorId, monitor?.type]); - const { data: certificateData } = useGet(certificateUrl); + const { data: certificateData } = useGet( + certificateUrl, + {}, + { revalidateOnFocus: false } + ); const certificateExpiry = useMemo(() => { if (!certificateData?.certificateDate) { @@ -106,7 +110,7 @@ const UptimeDetailsPage = () => { const { data: checksData, isLoading: checksIsLoading } = useGet( checksUrl, {}, - { keepPreviousData: true } + { keepPreviousData: true, revalidateOnFocus: false } ); // Geo checks fetch - only for HTTP monitors with geo checks enabled @@ -121,7 +125,13 @@ const UptimeDetailsPage = () => { }, [monitorId, monitor?.type, monitor?.geoCheckEnabled, dateRange, selectedLocation]); const { data: _geoChecksData, isLoading: _geoChecksIsLoading } = - useGet(geoChecksUrl, {}, { keepPreviousData: true }); + useGet( + geoChecksUrl, + {}, + { keepPreviousData: true, revalidateOnFocus: false } + ); + + const geoChecks = _geoChecksData?.groupedGeoChecks ?? []; // Extract unique locations from geo checks data const geoLocations = monitor?.geoCheckLocations; @@ -184,15 +194,19 @@ const UptimeDetailsPage = () => { /> {monitor?.geoCheckEnabled && ( - - Location breakdown + <> + Location breakdown - + + )} );