Remove usage of hardcoded mailpoet_email string from the JS package

MAILPOET-6430
This commit is contained in:
Oluwaseun Olorunsola
2025-01-28 22:51:40 +01:00
committed by Oluwaseun Olorunsola
parent 9a2502826f
commit a49b978050
15 changed files with 69 additions and 32 deletions

View File

@ -16,6 +16,7 @@ import {
storeName,
TemplateCategory,
TemplatePreview,
editorCurrentPostType,
} from '../../store';
import { TemplateList } from './template-list';
import { TemplateCategoriesListSidebar } from './template-categories-list-sidebar';
@ -94,7 +95,7 @@ export function SelectTemplateModal( {
const hasTemplates = templates?.length > 0;
const handleTemplateSelection = ( template: TemplatePreview ) => {
const templateIsPostContent = template.type === 'mailpoet_email';
const templateIsPostContent = template.type === editorCurrentPostType;
const postContent = template.template as unknown as EmailEditorPostType;