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

Commit

Permalink
Set isPreview when generating block preview in switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Oct 16, 2023
1 parent a7a21b6 commit 926f974
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion assets/js/blocks/classic-shortcode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ const ConvertTemplate = ( { blockifyConfig, clientId, attributes } ) => {
} }
>
<BlockPreview
blocks={ getBlockifiedTemplate( attributes ) }
blocks={ getBlockifiedTemplate( {
...attributes,
isPreview: true,
} ) }
viewportWidth={ 1200 }
additionalStyles={ [
{
Expand Down
5 changes: 4 additions & 1 deletion assets/js/blocks/classic-template/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ const ConvertTemplate = ( { blockifyConfig, clientId, attributes } ) => {
} }
>
<BlockPreview
blocks={ getBlockifiedTemplate( attributes ) }
blocks={ getBlockifiedTemplate( {
...attributes,
isPreview: true,
} ) }
viewportWidth={ 1200 }
additionalStyles={ [
{
Expand Down

0 comments on commit 926f974

Please sign in to comment.