reuse single preview iframe

Made-with: Cursor
This commit is contained in:
“kirukib” 2026-04-02 11:26:28 +03:00
parent adbf36578b
commit c655317e31

View File

@ -130,7 +130,7 @@ export default function App() {
<aside style={styles.card}> <aside style={styles.card}>
<div style={{ display: 'grid', gap: 14 }}> <div style={{ display: 'grid', gap: 14 }}>
<BrandEditor brand={brand} onChange={setBrand} /> <BrandEditor brand={brand} onChange={setBrand} />
{template ? <VariablesForm key={templateId} template={template} data={data} onChange={setData} /> : null} {template ? <VariablesForm template={template} data={data} onChange={setData} /> : null}
<div style={{ display: 'grid', gap: 8 }}> <div style={{ display: 'grid', gap: 8 }}>
<div style={{ ...styles.sectionTitle, fontSize: 14 }}>Status</div> <div style={{ ...styles.sectionTitle, fontSize: 14 }}>Status</div>
@ -148,9 +148,9 @@ export default function App() {
<main style={styles.card}> <main style={styles.card}>
{template ? ( {template ? (
<div style={{ display: 'grid', gap: 16 }}> <div style={{ display: 'grid', gap: 16 }}>
<EmailPreview key={templateId} html={html} loading={loading} /> <EmailPreview html={html} loading={loading} />
<ExportPanel key={templateId} subject={subject} html={html} text={text} loading={loading} /> <ExportPanel subject={subject} html={html} text={text} loading={loading} />
</div> </div>
) : ( ) : (
<div>No template selected.</div> <div>No template selected.</div>