diff --git a/src/app/account/page.tsx b/src/app/account/page.tsx index 1b6d787..4cd88f9 100644 --- a/src/app/account/page.tsx +++ b/src/app/account/page.tsx @@ -9,6 +9,7 @@ import SignOutForm from '@/components/form/signOutForm'; import { URL_SIGN_IN } from '@/lib/constants'; import GenerateSampleDataForm from '@/components/form/generateSampleDataForm'; import generateSampleData from '@/lib/actions/generateSampleData'; +import { prismaClient } from '@/prisma'; export default async function AccountPage() { @@ -18,6 +19,28 @@ export default async function AccountPage() { redirect(URL_SIGN_IN); } + let paymentCount = 0; + let entityCount = 0; + let categoryCount = 0; + + if (process.env.NODE_ENV === 'development') { + paymentCount = await prismaClient.payment.count({ + where: { + userId: user.id, + }, + }); + entityCount = await prismaClient.entity.count({ + where: { + userId: user.id, + }, + }); + categoryCount = await prismaClient.category.count({ + where: { + userId: user.id, + }, + }); + } + return (
@@ -38,6 +61,26 @@ export default async function AccountPage() { disabled value={user?.username}/>
+
+
+ + +
+
+ + +
+
+ + +
+
{