fix: eslint and build

This commit is contained in:
2026-02-07 09:36:17 +01:00
parent 1135b33792
commit 35b7ba56ed
14 changed files with 3376 additions and 490 deletions

View File

@@ -8,15 +8,11 @@ import { ConceptPrice, ConceptAutomation } from '../../Landing/ConceptIllustrati
import { Info, Download, Share2, RefreshCw } from 'lucide-react';
import { motion, AnimatePresence } from 'framer-motion';
import dynamic from 'next/dynamic';
import { EstimationPDF } from '../../EstimationPDF';
// EstimationPDF will be imported dynamically where used or inside the and client-side block
import IconWhite from '../../../assets/logo/Icon White Transparent.png';
import LogoBlack from '../../../assets/logo/Logo Black Transparent.png';
// Dynamically import PDF components to avoid SSR issues
const PDFDownloadLink = dynamic(
() => import('@react-pdf/renderer').then((mod) => mod.PDFDownloadLink),
{ ssr: false }
);
// PDF components removed from top-level dynamic import to fix ESM resolution issues in Next.js 16/Webpack
interface PriceCalculationProps {
state: FormState;
@@ -44,8 +40,7 @@ export function PriceCalculation({
setPdfLoading(true);
try {
const { pdf } = await import('@react-pdf/renderer');
const { EstimationPDF } = await import('../../EstimationPDF');
const doc = <EstimationPDF
state={state}
totalPrice={totalPrice}
@@ -56,6 +51,8 @@ export function PriceCalculation({
footerLogo={typeof LogoBlack === 'string' ? LogoBlack : (LogoBlack as any).src}
/>;
const { pdf } = await import('@react-pdf/renderer');
// Minimum loading time of 2 seconds for better UX
const [blob] = await Promise.all([
pdf(doc).toBlob(),