feat: Adsterra integration, code splitting, cleanup, Onidel affiliate
This commit is contained in:
@@ -94,7 +94,6 @@ const InvoicePreview = () => {
|
||||
setPdfPageSize(savedPageSize);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to load invoice data:', error);
|
||||
navigate('/invoice-editor');
|
||||
}
|
||||
}, [navigate]);
|
||||
@@ -262,7 +261,6 @@ const InvoicePreview = () => {
|
||||
|
||||
await html2pdf().set(opt).from(element).save();
|
||||
} catch (error) {
|
||||
console.error('PDF generation failed:', error);
|
||||
alert('Failed to generate PDF. Please try again.');
|
||||
} finally {
|
||||
// Restore original styles after a short delay
|
||||
@@ -281,7 +279,7 @@ const InvoicePreview = () => {
|
||||
try {
|
||||
localStorage.setItem('currentInvoice', JSON.stringify(invoiceData));
|
||||
} catch (error) {
|
||||
console.error('Failed to save invoice data before edit:', error);
|
||||
// Failed to save invoice data before edit
|
||||
}
|
||||
}
|
||||
// Add a parameter to indicate we're editing existing data
|
||||
|
||||
Reference in New Issue
Block a user