Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 926f974

Browse files
committed
Set isPreview when generating block preview in switcher
1 parent a7a21b6 commit 926f974

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

assets/js/blocks/classic-shortcode/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ const ConvertTemplate = ( { blockifyConfig, clientId, attributes } ) => {
156156
} }
157157
>
158158
<BlockPreview
159-
blocks={ getBlockifiedTemplate( attributes ) }
159+
blocks={ getBlockifiedTemplate( {
160+
...attributes,
161+
isPreview: true,
162+
} ) }
160163
viewportWidth={ 1200 }
161164
additionalStyles={ [
162165
{

assets/js/blocks/classic-template/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ const ConvertTemplate = ( { blockifyConfig, clientId, attributes } ) => {
175175
} }
176176
>
177177
<BlockPreview
178-
blocks={ getBlockifiedTemplate( attributes ) }
178+
blocks={ getBlockifiedTemplate( {
179+
...attributes,
180+
isPreview: true,
181+
} ) }
179182
viewportWidth={ 1200 }
180183
additionalStyles={ [
181184
{

0 commit comments

Comments
 (0)