Update filter name and add reason for ts-ignore
MAILPOET-6315
This commit is contained in:
committed by
Jan Lysý
parent
02d424d8a1
commit
13bf305aeb
@ -6,6 +6,6 @@ import { addFilter } from '@wordpress/hooks';
|
|||||||
import { withNpsPoll } from '../nps-poll';
|
import { withNpsPoll } from '../nps-poll';
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
|
|
||||||
addFilter('mailpoet_email_editor_the_editor_component', 'mailpoet', (editor) =>
|
addFilter('mailpoet_email_editor_wrap_editor_component', 'mailpoet', (editor) =>
|
||||||
withNpsPoll(editor),
|
withNpsPoll(editor),
|
||||||
);
|
);
|
||||||
|
@ -33,7 +33,7 @@ function Editor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const WrappedEditor = applyFilters(
|
const WrappedEditor = applyFilters(
|
||||||
'mailpoet_email_editor_the_editor_component',
|
'mailpoet_email_editor_wrap_editor_component',
|
||||||
Editor
|
Editor
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -47,6 +47,6 @@ export function initialize( elementId: string ) {
|
|||||||
initBlocks();
|
initBlocks();
|
||||||
initHooks();
|
initHooks();
|
||||||
const root = createRoot( container );
|
const root = createRoot( container );
|
||||||
// @ts-ignore
|
// @ts-ignore We don't have a type for WrappedEditor.
|
||||||
root.render( <WrappedEditor /> );
|
root.render( <WrappedEditor /> );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user