Clear design state after submission for approval
After a design is successfully submitted for approval, clear the elementsFront and elementsBack state so users start with a blank canvas when creating their next design. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
609cfdb7d6
commit
5daa380e9d
@@ -962,6 +962,9 @@ export default function DesignCanvas({ product, isAdminEditing = false }: { prod
|
||||
setDesignApprovalId(design.id);
|
||||
setApprovalStatus('PENDING');
|
||||
setSubmissionMessage(`✓ Design submitted for approval! You'll receive an email when it's ready to add to your bag.`);
|
||||
// Clear design elements so user can start fresh
|
||||
setElementsFront([]);
|
||||
setElementsBack([]);
|
||||
// Save to localStorage so status persists on page reload
|
||||
if (typeof window !== 'undefined') {
|
||||
localStorage.setItem(`designApproval_${product.id}`, JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user