Move ListviewSidebar state from email editor store to @wordpress/editor store

MAILPOET-6303
This commit is contained in:
Oluwaseun Olorunsola
2024-11-12 13:18:46 +01:00
committed by Rostislav Wolný
parent ef009d0400
commit e37997e2e1
3 changed files with 11 additions and 20 deletions

View File

@@ -237,9 +237,11 @@ export const isInserterSidebarOpened = createRegistrySelector(
select( editorStore ).isInserterOpened() as boolean
);
export function isListviewSidebarOpened( state: State ): boolean {
return state.listviewSidebar.isOpened;
}
export const isListviewSidebarOpened = createRegistrySelector(
( select ) => () =>
// @ts-expect-error isListViewOpened is missing in types.
select( editorStore ).isListViewOpened() as boolean
);
export function getSettingsSidebarActiveTab( state: State ): string {
return state.settingsSidebar.activeTab;