From 32016ee1d6db409c88404e8d6cbd2697e8859255 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Thu, 4 Jan 2024 23:04:12 +0530 Subject: [PATCH] uptime: fix issue with reverse --- src/Components/Common/Uptime.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Common/Uptime.tsx b/src/Components/Common/Uptime.tsx index 138cd43368d..e3c7dd7a439 100644 --- a/src/Components/Common/Uptime.tsx +++ b/src/Components/Common/Uptime.tsx @@ -61,7 +61,7 @@ function UptimeInfo({ <> Status Updates
- {incidents.toReversed().map((incident, index) => { + {incidents.reverse().map((incident, index) => { const prevIncident = incidents[index - 1]; let endTimestamp; let ongoing = false; @@ -171,7 +171,7 @@ export default function Uptime(props: { assetId: string }) { }>([]); const { data, loading } = useQuery(routes.listAssetAvailability, { query: { external_id: props.assetId }, - onResponse: ({ data }) => setUptimeRecord(data?.results.toReversed() ?? []), + onResponse: ({ data }) => setUptimeRecord(data?.results.reverse() ?? []), }); const availabilityData = data?.results ?? []; const graphElem = useRef(null);