mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-04-12 05:08:43 +00:00
N-FIN-47: add button to delete account
This commit is contained in:
parent
2de7d36138
commit
c9b9dec342
1 changed files with 11 additions and 1 deletions
|
@ -9,6 +9,7 @@ import { URL_SIGN_IN } from '@/lib/constants';
|
||||||
import generateSampleData from '@/lib/actions/generateSampleData';
|
import generateSampleData from '@/lib/actions/generateSampleData';
|
||||||
import { prismaClient } from '@/prisma';
|
import { prismaClient } from '@/prisma';
|
||||||
import { ServerActionTrigger } from '@/components/form/serverActionTrigger';
|
import { ServerActionTrigger } from '@/components/form/serverActionTrigger';
|
||||||
|
import accountDelete from '@/lib/actions/accountDelete';
|
||||||
|
|
||||||
export default async function AccountPage() {
|
export default async function AccountPage() {
|
||||||
|
|
||||||
|
@ -82,7 +83,16 @@ export default async function AccountPage() {
|
||||||
</CardContent>
|
</CardContent>
|
||||||
<CardFooter className="w-full grid gap-4 grid-cols-1 md:grid-cols-2">
|
<CardFooter className="w-full grid gap-4 grid-cols-1 md:grid-cols-2">
|
||||||
<ServerActionTrigger
|
<ServerActionTrigger
|
||||||
className="col-span-2"
|
action={accountDelete}
|
||||||
|
dialog={{
|
||||||
|
title: 'Delete Account',
|
||||||
|
description: 'Are you sure you want to delete your account? This action is irreversible.',
|
||||||
|
actionText: 'Delete Account',
|
||||||
|
}}
|
||||||
|
variant="outline">
|
||||||
|
Delete Account
|
||||||
|
</ServerActionTrigger>
|
||||||
|
<ServerActionTrigger
|
||||||
action={signOut}>
|
action={signOut}>
|
||||||
Sign Out
|
Sign Out
|
||||||
</ServerActionTrigger>
|
</ServerActionTrigger>
|
||||||
|
|
Loading…
Add table
Reference in a new issue