Fix module canvas backgrounds, clear dummy badges, add SVG upload, new template creation, and {jednotkova_cena} variable

This commit is contained in:
Jakub_Hostacny committed 2026-09-24 11:22:23 +02:00
1 parent ab74922b93
commit 3dc5778155
3 files changed
+463 -238

No files matched your search

+4 -6
View File
@@ -3,7 +3,7 @@
import React, { useState, useEffect } from 'react';
import { NewsletterCampaign, NewsletterModule, ProductItem, BadgeTemplate } from '@/types/newsletter';
import { DEFAULT_CAMPAIGN, SUPABASE_ASSETS_BASE } from '@/lib/defaultCampaign';
import { renderEmailHtml } from '@/lib/emailRenderer';
import { renderEmailHtml, renderSingleModuleHtml } from '@/lib/emailRenderer';
import { supabase } from '@/lib/supabase';
import { TopBar } from '@/components/editor/TopBar';
import { ConfigPanel } from '@/components/editor/ConfigPanel';
@@ -409,13 +409,10 @@ export default function Home() {
</div>
)}
{/* Vykreslenie modulu bez vnútorných medzier navyše */}
{/* Vykreslenie čistého modulu bez obaľovacieho gradientu na každom bloku */}
<div
dangerouslySetInnerHTML={{
__html: renderEmailHtml({
...campaign,
modules: [mod]
})
__html: renderSingleModuleHtml(mod, campaign)
}}
className="pointer-events-none"
/>
@@ -454,6 +451,7 @@ export default function Home() {
currentDiscount={targetProduct?.discountText || '25%'}
currentPriceMain={targetProduct?.priceMain || '1'}
currentPriceSub={targetProduct?.priceSub || '99'}
currentUnitPrice={targetProduct?.unitPrice || '1kg = 4,91 €'}
/>
</div>
);