diff --git a/src/OnboardingSPA/components/LivePreview/BlockPreview/index.js b/src/OnboardingSPA/components/LivePreview/BlockPreview/index.js index f9fdee0a2..6ae00f11d 100644 --- a/src/OnboardingSPA/components/LivePreview/BlockPreview/index.js +++ b/src/OnboardingSPA/components/LivePreview/BlockPreview/index.js @@ -1,7 +1,7 @@ import { useSelect } from '@wordpress/data'; import { BlockEditorProvider } from '@wordpress/block-editor'; import { parse } from '@wordpress/blocks'; -import { useEffect, useState } from '@wordpress/element'; +import { useEffect, useState, memo } from '@wordpress/element'; import AutoHeightBlockPreview from './auto'; import { useGlobalStylesOutput } from '../../../utils/global-styles/use-global-styles-output'; @@ -75,18 +75,24 @@ const BlockPreview = ( { } }, [ storedPreviewSettings ] ); + const SkeletonLivePreview = memo(() => { + return ( +
+
+
+
+
+
+
+
+ ); + }); + + console.count('Rendered'); + return (
- { loading && ( -
-
-
-
-
-
-
-
- )} + { loading && } { settings && (