Merge pull request #629 from bluewave-labs/fix/fe/pagespeed

Fixed mutation of data
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-08-14 11:55:30 -07:00
commit 1ff8331820
1 file changed
+2 -2
+2 -2
View File
@@ -299,7 +299,7 @@ const PageSpeedDetails = () => {
const [expand, setExpand] = useState(false); const [expand, setExpand] = useState(false);
let loading = Object.keys(monitor).length === 0; let loading = Object.keys(monitor).length === 0;
const data = monitor?.checks ? [...monitor.checks].reverse() : [];
return ( return (
<Stack className="page-speed-details" gap={theme.gap.large}> <Stack className="page-speed-details" gap={theme.gap.large}>
{loading ? ( {loading ? (
@@ -406,7 +406,7 @@ const PageSpeedDetails = () => {
</Stack> </Stack>
<Typography component="h2">Score history</Typography> <Typography component="h2">Score history</Typography>
<Box height="300px"> <Box height="300px">
<PageSpeedLineChart pageSpeedChecks={monitor?.checks?.reverse()} /> <PageSpeedLineChart pageSpeedChecks={data} />
</Box> </Box>
<Typography component="h2">Performance report</Typography> <Typography component="h2">Performance report</Typography>
<Stack direction="row" alignItems="center" overflow="hidden" flex={1}> <Stack direction="row" alignItems="center" overflow="hidden" flex={1}>