Skip to content

Commit

Permalink
Refactor: Added loader when performing account deletion action
Browse files Browse the repository at this point in the history
  • Loading branch information
CuriousCoder00 committed Oct 5, 2024
1 parent f1327aa commit 4f1e6b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/profile/AccountSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const AccountSettings = ({}: Props) => {
<Dialog>
<DialogTrigger asChild>
<Button className="w-40" variant={'destructive'}>
{isPending ? <Loader /> : 'Delete Account'}
Delete Account
</Button>
</DialogTrigger>
<DialogContent>
Expand All @@ -89,11 +89,12 @@ export const AccountSettings = ({}: Props) => {
</DialogHeader>
<div className="flex gap-4 justify-end">
<Button
className="w-40"
variant={'destructive'}
onClick={handleDeleteAccount}
disabled={isPending}
>
Delete Account
{isPending ? <Loader /> : 'Delete Account'}
</Button>
<DialogClose asChild>
<Button variant={'ghost'} disabled={isPending}>
Expand Down

0 comments on commit 4f1e6b9

Please sign in to comment.