diff --git a/src/components/DesignCanvas.tsx b/src/components/DesignCanvas.tsx index 91065fa..e1a276c 100644 --- a/src/components/DesignCanvas.tsx +++ b/src/components/DesignCanvas.tsx @@ -640,6 +640,14 @@ export default function DesignCanvas({ product, isAdminEditing = false }: { prod }, []); const addText = () => { + // Clear old approval status when starting a new design + if (approvalStatus) { + setApprovalStatus(null); + setDesignApprovalId(null); + if (typeof window !== 'undefined') { + localStorage.removeItem(`designApproval_${product.id}`); + } + } const id = uuid(); setActiveElements((prev) => [ ...prev, @@ -669,6 +677,14 @@ export default function DesignCanvas({ product, isAdminEditing = false }: { prod const src = reader.result as string; const img = new window.Image(); img.onload = () => { + // Clear old approval status when starting a new design + if (approvalStatus) { + setApprovalStatus(null); + setDesignApprovalId(null); + if (typeof window !== 'undefined') { + localStorage.removeItem(`designApproval_${product.id}`); + } + } const maxDim = Math.min(activeStageW, activeStageH) * 0.7; const scale = Math.min(maxDim / img.width, maxDim / img.height, 1); const id = uuid();