import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { PageHeader } from "@/components/page-header"; import { ContactsView } from "@/features/contacts/components/contacts-view"; import { listContacts } from "@/features/contacts/service"; import { openInKindByContact } from "@/features/in-kind/service"; import { hasHouseholdRole } from "@/features/households/roles"; import { tr } from "@/i18n/tr"; import { requireActiveHousehold } from "@/lib/dal"; export const metadata: Metadata = { title: tr.contacts.title }; export default async function ContactsPage() { const { user, household } = await requireActiveHousehold("viewer"); const [data, inKind] = await Promise.all([ listContacts(user.id, household.id), openInKindByContact(user.id, household.id), ]); if (!data) notFound(); return ( <> ); }