diff --git a/admin-spa/src/components/EmailBuilder/BlockRenderer.tsx b/admin-spa/src/components/EmailBuilder/BlockRenderer.tsx index cbd93e2..024afa0 100644 --- a/admin-spa/src/components/EmailBuilder/BlockRenderer.tsx +++ b/admin-spa/src/components/EmailBuilder/BlockRenderer.tsx @@ -26,18 +26,6 @@ export function BlockRenderer({ const renderBlockContent = () => { switch (block.type) { - case 'header': - return ( -
Your text content here...
' }; case 'card': - return { id, type, cardType: 'default', content: 'Card content...
' }; + return { id, type, cardType: 'default', content: 'Your content here...
' }; case 'button': return { id, type, text: 'Click Here', link: '{order_url}', style: 'solid' }; case 'divider': @@ -69,9 +65,7 @@ export function EmailBuilder({ blocks, onChange, variables = [] }: EmailBuilderP const openEditDialog = (block: EmailBlock) => { setEditingBlockId(block.id); - if (block.type === 'header' || block.type === 'text') { - setEditingContent(block.content); - } else if (block.type === 'card') { + if (block.type === 'card') { setEditingContent(block.content); setEditingCardType(block.cardType); } else if (block.type === 'button') { @@ -89,11 +83,7 @@ export function EmailBuilder({ blocks, onChange, variables = [] }: EmailBuilderP const newBlocks = blocks.map(block => { if (block.id !== editingBlockId) return block; - if (block.type === 'header') { - return { ...block, content: editingContent }; - } else if (block.type === 'text') { - return { ...block, content: editingContent }; - } else if (block.type === 'card') { + if (block.type === 'card') { return { ...block, content: editingContent, cardType: editingCardType }; } else if (block.type === 'button') { return { ...block, text: editingButtonText, link: editingButtonLink, style: editingButtonStyle }; @@ -116,26 +106,6 @@ export function EmailBuilder({ blocks, onChange, variables = [] }: EmailBuilderP {__('Add Block:')} - -