Skip to content

Commit c9f9aa1

Browse files
committed
Clear deep sync loading screen from modal when closing it
1 parent f68b8cf commit c9f9aa1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

components/sections/migrate/deep-scan-modal.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export function DeepScanModal({
147147
}
148148

149149
const handleClose = () => {
150+
if (isCompleted) {
151+
onDone?.()
152+
return
153+
}
150154
// Just close the modal without canceling the scan
151155
// Let the scan continue in background
152156
onClose()
@@ -395,7 +399,13 @@ export function DeepScanModal({
395399

396400
<DialogFooter>
397401
{isCompleted ? (
398-
<Button onClick={onDone}>Done</Button>
402+
<Button
403+
onClick={() => {
404+
onDone?.()
405+
}}
406+
>
407+
Done
408+
</Button>
399409
) : isScanning ? (
400410
<Button variant="outline" onClick={onCancel} disabled={isCancelling}>
401411
{isCancelling ? 'Cancelling...' : 'Cancel Scan'}

0 commit comments

Comments
 (0)