Skip to content

Commit

Permalink
Remove unnecessary Popover.Slot
Browse files Browse the repository at this point in the history
It is not longer needed see: WordPress/gutenberg#53889
It was causing TS errors
[MAILPOET-5714]
  • Loading branch information
costasovo committed Feb 16, 2024
1 parent c576107 commit cefe5df
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions mailpoet/assets/js/src/automation/automation.tsx
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { TopBarWithBeamer } from 'common/top-bar/top-bar';
import { Popover, SlotFillProvider } from '@wordpress/components';
import { SlotFillProvider } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { registerTranslations } from 'common';
import { initializeApi } from './api';
Expand Down Expand Up @@ -82,7 +82,6 @@ function App(): JSX.Element {
<SlotFillProvider>
<BrowserRouter>
<Automations />
<Popover.Slot />
</BrowserRouter>
</SlotFillProvider>
);
Expand Down
Expand Up @@ -2,7 +2,6 @@ import { useMemo, useRef } from 'react';
import {
__unstableComposite as Composite,
__unstableUseCompositeState as useCompositeState,
Popover,
SlotFillProvider,
} from '@wordpress/components';
import { useSelect } from '@wordpress/data';
Expand Down Expand Up @@ -71,7 +70,6 @@ export function Automation({
<Flow stepData={automationData.steps.root} row={0} />
</div>
<div />
<Popover.Slot />
</div>
<InserterPopover />
</Composite>
Expand Down
3 changes: 1 addition & 2 deletions mailpoet/assets/js/src/automation/editor/index.tsx
@@ -1,7 +1,7 @@
import classnames from 'classnames';
import { createRoot } from 'react-dom/client';
import { useEffect, useState } from 'react';
import { Button, Icon, Popover, SlotFillProvider } from '@wordpress/components';
import { Button, Icon, SlotFillProvider } from '@wordpress/components';
import { store as noticesStore } from '@wordpress/notices';
import { dispatch, select as globalSelect, useSelect } from '@wordpress/data';
import { getSettings, setSettings } from '@wordpress/date';
Expand Down Expand Up @@ -167,7 +167,6 @@ function Editor(): JSX.Element {
}
/>
{isActivationPanelOpened && <ActivatePanel />}
<Popover.Slot />
</SlotFillProvider>
</ShortcutProvider>
);
Expand Down
3 changes: 1 addition & 2 deletions mailpoet/assets/js/src/email-editor/engine/editor.tsx
@@ -1,7 +1,7 @@
import '@wordpress/format-library'; // Enables text formatting capabilities
import { useSelect } from '@wordpress/data';
import { StrictMode, createRoot } from '@wordpress/element';
import { Popover, SlotFillProvider } from '@wordpress/components';
import { SlotFillProvider } from '@wordpress/components';
import { ShortcutProvider } from '@wordpress/keyboard-shortcuts';
import { EntityProvider } from '@wordpress/core-data';
import { initBlocks } from './blocks';
Expand All @@ -26,7 +26,6 @@ function Editor() {
<KeyboardShortcuts />
<EntityProvider kind="postType" type="mailpoet_email" id={postId}>
<BlockEditor />
<Popover.Slot />
</EntityProvider>
</SlotFillProvider>
</ShortcutProvider>
Expand Down

0 comments on commit cefe5df

Please sign in to comment.