PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Launch/components/PagePreview.jsx +6 -7 3.1.23.2.1 View file →
@@ -1,7 +1,7 @@
1 -import blockStyleVariations from '@launch/_data/block-style-variations.json';
2 1 import themeJSON from '@launch/_data/theme-processed.json';
3 2 import { usePreviewIframe } from '@launch/hooks/usePreviewIframe';
3 +import { useVibeCss } from '@launch/hooks/useVibeCss';
4 4 import { getFontOverrides } from '@launch/lib/preview-helpers';
5 5 import { hexTomatrixValues, lowerImageQuality } from '@launch/lib/util';
6 6 import { pageNames } from '@shared/lib/pages';
7 7 import { BlockPreview } from '@wordpress/block-editor';
@@ -28,14 +28,13 @@
28 28 const vibe = useMemo(
29 29 () => style?.siteStyle?.vibe,
30 30 [style?.siteStyle?.vibe],
31 31 );
32 - const blockVariationCSS = useMemo(() => {
33 - if (vibe && blockStyleVariations[vibe]) {
34 - return blockStyleVariations[vibe];
35 - }
36 - return blockStyleVariations['natural-1'] || '';
37 - }, [vibe]);
32 + const { data: vibeCss } = useVibeCss();
33 + const blockVariationCSS = useMemo(
34 + () => vibeCss?.[vibe] ?? vibeCss?.['natural-1'] ?? '',
35 + [vibe, vibeCss],
36 + );
38 37
39 38 const onLoad = useCallback(
40 39 (frame) => {
41 40 frame.contentDocument?.getElementById('ext-tj')?.remove();