Skip to content

Commit 0905976

Browse files
chore(swingset): hold the card harness button pending until reverification is ready (#10581)
1 parent 16ab711 commit 0905976

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎packages/swingset/src/app/(clerk)/live/misc/reverification/page.tsx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useConfirmController } from '@clerk/mosaic/blocks/confirm';
44
import { Destructive } from '@clerk/mosaic/blocks/destructive';
5-
import { Button } from '@clerk/mosaic/components/button';
5+
import { Button, SubmitButton } from '@clerk/mosaic/components/button';
66
import { Card } from '@clerk/mosaic/components/card';
77
import { Dialog } from '@clerk/mosaic/components/dialog';
88
import { Flow, type FlowDirection } from '@clerk/mosaic/components/flow';
@@ -49,9 +49,10 @@ function CardHarness() {
4949
return (
5050
<div className='flex flex-col gap-4'>
5151
<div className='flex flex-wrap items-center gap-2'>
52-
<Button
52+
<SubmitButton
53+
type='button'
5354
color='negative'
54-
disabled={busy}
55+
isPending={busy}
5556
onClick={() => {
5657
if (busy) {
5758
return;
@@ -84,9 +85,9 @@ function CardHarness() {
8485
}}
8586
>
8687
Delete account
87-
</Button>
88+
</SubmitButton>
8889
</div>
89-
{requestPending ? (
90+
{requestPending && reverification.visible ? (
9091
<Card.Root renderBranding={false}>
9192
<Reverification controller={reverification} />
9293
</Card.Root>

0 commit comments

Comments
 (0)