Update filter name and add reason for ts-ignore

MAILPOET-6315
This commit is contained in:
Oluwaseun Olorunsola
2024-11-22 17:44:40 +01:00
committed by Jan Lysý
parent 02d424d8a1
commit 13bf305aeb
2 changed files with 3 additions and 3 deletions

View File

@ -6,6 +6,6 @@ import { addFilter } from '@wordpress/hooks';
import { withNpsPoll } from '../nps-poll';
import './index.scss';
addFilter('mailpoet_email_editor_the_editor_component', 'mailpoet', (editor) =>
addFilter('mailpoet_email_editor_wrap_editor_component', 'mailpoet', (editor) =>
withNpsPoll(editor),
);

View File

@ -33,7 +33,7 @@ function Editor() {
}
const WrappedEditor = applyFilters(
'mailpoet_email_editor_the_editor_component',
'mailpoet_email_editor_wrap_editor_component',
Editor
);
@ -47,6 +47,6 @@ export function initialize( elementId: string ) {
initBlocks();
initHooks();
const root = createRoot( container );
// @ts-ignore
// @ts-ignore We don't have a type for WrappedEditor.
root.render( <WrappedEditor /> );
}