Merge pull request #629 from bluewave-labs/fix/fe/pagespeed
Fixed mutation of data
This commit is contained in:
1 file changed
+2
-2
@@ -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}>
|
||||||
|
|||||||
Reference in new issue
Block a user