feat: citizenship built

This commit is contained in:
Ivan Rezchikov
2026-07-03 15:03:35 +03:00
parent c60ab9e8f9
commit 2eb0de5357
46 changed files with 1150 additions and 257 deletions
+30
View File
@@ -0,0 +1,30 @@
import Header from "@/components/header";
import Footer from "@/components/footer";
import ReviewPageClient from "./client";
import { getCurrentUser } from "@/lib/user";
import { redirect } from "next/navigation";
import { AccountMenu } from "../../account-menu";
import { getPendingApplications } from "@/lib/citizenship/repository";
export default async function ReviewPage() {
const user = await getCurrentUser();
if (!user?.isAdmin) redirect("/account/citizenship");
const applications = await getPendingApplications()
const applicationsWithWarning = applications.map((app) => ({
...app,
nameMismatch: app.givenNames !== app.user.firstName || app.surname !== app.user.secondName,
}))
return (
<>
<Header />
<div className="flex flex-row py-16 gap-8">
<AccountMenu />
<ReviewPageClient applications={applicationsWithWarning} />
</div>
<Footer />
</>
);
}