From 88a098f387050114754c8195f765dbc36244d943 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Sat, 16 May 2026 19:13:16 +0800 Subject: [PATCH] fix: enforce max screenshot limit (2) on upload area and existing remove button --- components/wizard/steps/review-step.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/components/wizard/steps/review-step.tsx b/components/wizard/steps/review-step.tsx index f709a30..b1176dd 100644 --- a/components/wizard/steps/review-step.tsx +++ b/components/wizard/steps/review-step.tsx @@ -290,10 +290,12 @@ export function ReviewStep({ return opt?.label ?? environment.frameGenMethod })() + const totalScreenshots = (existingScreenshots?.length ?? 0) + (screenshotFiles?.length ?? 0) const canUploadMore = - (!screenshotFiles || screenshotFiles.length < 2) && + totalScreenshots < 2 && submitPhase !== "uploading" && submitPhase !== "saving" + const showExistingRemove = totalScreenshots >= 2 return (
@@ -559,14 +561,16 @@ export function ReviewStep({ draggable={false} />
- + {showExistingRemove && ( + + )}
Existing ยท #{ss.orderIndex + 1}