import { cached } from '@/app/cached-functions' import { BalancesList } from '@/app/groups/[groupId]/balances-list' import { ReimbursementList } from '@/app/groups/[groupId]/reimbursement-list' import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card' import { getGroupExpenses } from '@/lib/api' import { getBalances, getPublicBalances, getSuggestedReimbursements, } from '@/lib/balances' import { Metadata } from 'next' import { getTranslations } from 'next-intl/server' import { notFound } from 'next/navigation' export const metadata: Metadata = { title: 'Balances', } export default async function GroupPage({ params: { groupId }, }: { params: { groupId: string } }) { const t = await getTranslations('Balances') const group = await cached.getGroup(groupId) if (!group) notFound() const expenses = await getGroupExpenses(groupId) const balances = getBalances(expenses) const reimbursements = getSuggestedReimbursements(balances) const publicBalances = getPublicBalances(reimbursements) return ( <> {t('title')} {t('description')} {t('Reimbursements.title')} {t('Reimbursements.description')} ) }