diff --git a/packages/js/email-editor/src/components/sidebar/email-settings.tsx b/packages/js/email-editor/src/components/sidebar/email-settings.tsx index c8d40682d5..dddc8906e9 100644 --- a/packages/js/email-editor/src/components/sidebar/email-settings.tsx +++ b/packages/js/email-editor/src/components/sidebar/email-settings.tsx @@ -1,13 +1,11 @@ import { Panel } from '@wordpress/components'; import { DetailsPanel } from './details-panel'; import { EmailTypeInfo } from './email-type-info'; -import { TemplatesPanel } from './templates-panel'; export function EmailSettings() { return ( - ); diff --git a/packages/js/email-editor/src/components/sidebar/template-settings.tsx b/packages/js/email-editor/src/components/sidebar/template-settings.tsx index f5ac38f3ed..f6238344bb 100644 --- a/packages/js/email-editor/src/components/sidebar/template-settings.tsx +++ b/packages/js/email-editor/src/components/sidebar/template-settings.tsx @@ -1,12 +1,10 @@ import { Panel } from '@wordpress/components'; import { TemplateInfo } from './template-info'; -import { TemplatesPanel } from './templates-panel'; export function TemplateSettings() { return ( - ); } diff --git a/packages/js/email-editor/src/components/sidebar/templates-panel.tsx b/packages/js/email-editor/src/components/sidebar/templates-panel.tsx deleted file mode 100644 index 5f7ccdf6ed..0000000000 --- a/packages/js/email-editor/src/components/sidebar/templates-panel.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { PanelBody, Button } from '@wordpress/components'; -import { useSelect, useDispatch } from '@wordpress/data'; -import { __ } from '@wordpress/i18n'; -import { store as editorStore } from '@wordpress/editor'; - -import { storeName } from '../../store'; - -export function TemplatesPanel() { - const { onNavigateToEntityRecord, template, hasHistory } = useSelect( - ( sel ) => { - // eslint-disable-next-line @typescript-eslint/naming-convention - const { getEditorSettings } = sel( editorStore ); - const editorSettings = getEditorSettings(); - return { - onNavigateToEntityRecord: - // @ts-expect-error onNavigateToEntityRecord type is not defined - editorSettings.onNavigateToEntityRecord, - // @ts-expect-error onNavigateToPreviousEntityRecord type is not defined - hasHistory: !! editorSettings.onNavigateToPreviousEntityRecord, - template: sel( storeName ).getEditedPostTemplate(), - }; - }, - [] - ); - - const { revertAndSaveTemplate } = useDispatch( storeName ); - - return ( - -

- Components from this Panel will be placed in different areas of - the UI. They are place here in one place just to simplify the - experiment. -

-
-

Edit template toggle

- { template && ! hasHistory && ( - - ) } -
-

Revert Template

- -
- ); -}