N-FIN-18: remove environment condition

This commit is contained in:
Markus Thielker 2024-03-11 09:52:06 +01:00
parent 48384b7687
commit 986db250cf
No known key found for this signature in database

View file

@ -20,26 +20,25 @@ export default async function AccountPage() {
} }
let paymentCount = 0; let paymentCount = 0;
let entityCount = 0; paymentCount = await prismaClient.payment.count({
let categoryCount = 0; where: {
userId: user.id,
},
});
if (process.env.NODE_ENV === 'development') { let entityCount = 0;
paymentCount = await prismaClient.payment.count({ entityCount = await prismaClient.entity.count({
where: { where: {
userId: user.id, userId: user.id,
}, },
}); });
entityCount = await prismaClient.entity.count({
where: { let categoryCount = 0;
userId: user.id, categoryCount = await prismaClient.category.count({
}, where: {
}); userId: user.id,
categoryCount = await prismaClient.category.count({ },
where: { });
userId: user.id,
},
});
}
return ( return (
<div className="flex flex-col items-center"> <div className="flex flex-col items-center">