Fixed UI flash happening on every render in pagespeed page
This commit is contained in:
1 parent
ea4cf6efd3
commit
70f88058a0
1 file changed
+5
-1
@@ -70,9 +70,13 @@ const PageSpeed = () => {
|
|||||||
dispatch(getPageSpeedByUserId(authToken));
|
dispatch(getPageSpeedByUserId(authToken));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// will show skeletons only on initial load
|
||||||
|
// since monitor state is being added to redux persist, there's no reason to display skeletons on every render
|
||||||
|
let isActuallyLoading = isLoading && monitors.length === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="page-speed">
|
<Box className="page-speed">
|
||||||
{isLoading ? (
|
{isActuallyLoading ? (
|
||||||
<Stack gap={theme.gap.xs}>
|
<Stack gap={theme.gap.xs}>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
|
|||||||
Reference in new issue
Block a user