Fix: Show Remove and Modify print area buttons for existing images

- Update PhotoPrintAreaField to accept existingImageUrl prop
- Display Remove and Modify print area buttons on edit page for existing images
- Users can now easily modify print area or remove existing images without
  uploading a new file

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-19 11:53:51 +01:00
co-authored by Claude Haiku 4.5
parent 684a837998
commit 56e31b4fae
2 changed files with 16 additions and 8 deletions
+2 -2
View File
@@ -266,7 +266,7 @@ export default async function EditProductPage({ params }: { params: { id: string
<p className="text-xs text-muted">Current photo. Upload a new one below to replace it.</p>
</div>
)}
<PhotoPrintAreaField />
<PhotoPrintAreaField existingImageUrl={product.imageUrl} />
</div>
<div>
@@ -281,7 +281,7 @@ export default async function EditProductPage({ params }: { params: { id: string
<p className="text-xs text-muted">Current back photo and print area. Upload a new one below to replace both.</p>
</div>
)}
<PhotoPrintAreaField variant="back" />
<PhotoPrintAreaField variant="back" existingImageUrl={product.imageUrlBack} />
</div>
<div>