From c9a7cab349f2abee8d394cd28a4afa077507634b Mon Sep 17 00:00:00 2001 From: Andymick Date: Sat, 18 Jul 2026 18:58:05 +0100 Subject: [PATCH] Add logging to debug approval status clearing Log when addText is called and whether approvalStatus is being cleared to help debug why the old approval message persists. Co-Authored-By: Claude Haiku 4.5 --- src/components/DesignCanvas.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/DesignCanvas.tsx b/src/components/DesignCanvas.tsx index e1a276c..55256ed 100644 --- a/src/components/DesignCanvas.tsx +++ b/src/components/DesignCanvas.tsx @@ -642,11 +642,15 @@ export default function DesignCanvas({ product, isAdminEditing = false }: { prod const addText = () => { // Clear old approval status when starting a new design if (approvalStatus) { + console.log('🧹 Clearing old approval status:', approvalStatus); setApprovalStatus(null); setDesignApprovalId(null); if (typeof window !== 'undefined') { localStorage.removeItem(`designApproval_${product.id}`); + console.log('✓ Removed designApproval from localStorage'); } + } else { + console.log('No approval status to clear'); } const id = uuid(); setActiveElements((prev) => [