import { ActiveUserModal } from '@/app/groups/[groupId]/expenses/active-user-modal' import { ExpenseList } from '@/app/groups/[groupId]/expenses/expense-list' import { Button } from '@/components/ui/button' import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card' import { Skeleton } from '@/components/ui/skeleton' import { getGroup, getGroupExpenses } from '@/lib/api' import { Download, Plus } from 'lucide-react' import { Metadata } from 'next' import Link from 'next/link' import { notFound } from 'next/navigation' import { Suspense } from 'react' export const metadata: Metadata = { title: 'Expenses', } export default async function GroupExpensesPage({ params: { groupId }, }: { params: { groupId: string } }) { const group = await getGroup(groupId) if (!group) notFound() return ( <>
Expenses Here are the expenses that you created for your group.
(
))} >
) } async function Expenses({ groupId }: { groupId: string }) { const group = await getGroup(groupId) if (!group) notFound() const expenses = await getGroupExpenses(group.id) return ( ) }