From c5c99c4b48b766a59b9e29746ca1b9df27dadd10 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 15 Jul 2024 14:45:57 +0200 Subject: [PATCH] Templates DataViews: Set the right context for the preview field (#63488) Co-authored-by: youknowriad Co-authored-by: ntsekouras Co-authored-by: jameskoster --- .../src/components/page-templates/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/edit-site/src/components/page-templates/index.js b/packages/edit-site/src/components/page-templates/index.js index 0e3c725a06f792..398d3da0fc64b1 100644 --- a/packages/edit-site/src/components/page-templates/index.js +++ b/packages/edit-site/src/components/page-templates/index.js @@ -18,7 +18,10 @@ import { } from '@wordpress/block-editor'; import { DataViews, filterSortAndPaginate } from '@wordpress/dataviews'; import { privateApis as routerPrivateApis } from '@wordpress/router'; -import { privateApis as editorPrivateApis } from '@wordpress/editor'; +import { + privateApis as editorPrivateApis, + EditorProvider, +} from '@wordpress/editor'; /** * Internal dependencies @@ -42,9 +45,7 @@ import { useEditPostAction } from '../dataviews-actions'; const { usePostActions } = unlock( editorPrivateApis ); -const { ExperimentalBlockEditorProvider, useGlobalStyle } = unlock( - blockEditorPrivateApis -); +const { useGlobalStyle } = unlock( blockEditorPrivateApis ); const { useHistory, useLocation } = unlock( routerPrivateApis ); const EMPTY_ARRAY = []; @@ -176,7 +177,7 @@ function Preview( { item, viewType } ) { // the block editor settings are needed in context where we don't have the block editor. // Explore how we can solve this in a better way. return ( - +
) }
-
+ ); }