cfc2b2c974
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
908 B
TypeScript
23 lines
908 B
TypeScript
import type { Metadata } from "next";
|
|
import { notFound } from "next/navigation";
|
|
import { PageHeader } from "@/components/page-header";
|
|
import { hasHouseholdRole } from "@/features/households/roles";
|
|
import { PlannedView } from "@/features/recurring/components/planned-view";
|
|
import { getPlannedOverview } from "@/features/recurring/service";
|
|
import { tr } from "@/i18n/tr";
|
|
import { requireActiveHousehold } from "@/lib/dal";
|
|
|
|
export const metadata: Metadata = { title: tr.recurring.title };
|
|
|
|
export default async function PlannedPage() {
|
|
const { user, household } = await requireActiveHousehold("viewer");
|
|
const data = await getPlannedOverview(user.id, household.id);
|
|
if (!data) notFound();
|
|
return (
|
|
<>
|
|
<PageHeader title={tr.recurring.title} description={tr.recurring.description} />
|
|
<PlannedView data={data} canWrite={hasHouseholdRole(household.role, "member")} />
|
|
</>
|
|
);
|
|
}
|