feat: citizenship applications

This commit is contained in:
Ivan Rezchikov
2026-06-23 19:03:10 +03:00
parent 58ec75c948
commit c60ab9e8f9
44 changed files with 1254 additions and 130 deletions
+114
View File
@@ -0,0 +1,114 @@
import Footer from "@/components/footer";
import Header from "@/components/header";
import { getCurrentUser } from "@/lib/user";
import { redirect } from "next/navigation";
import { AccountMenu } from "../menu";
import { InfoIcon } from "lucide-react";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import Link from "next/link";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
import { ApplicationsDialog } from "./applicationsDialog";
import { getUserApplications } from "@/lib/citizenship/repository";
export default async function Citizenship() {
const user = await getCurrentUser();
if (!user) redirect("/");
const applications = await getUserApplications(user.id);
return (
<>
<Header />
<div className="flex flex-row py-16 gap-8">
<AccountMenu />
<div className="flex flex-col gap-8 max-w-lg">
<div className="flex flex-col gap-6 w-min">
<h2>Citizenship</h2>
<Alert className="border-amber-200 bg-amber-50 text-amber-900">
<InfoIcon />
<AlertTitle>You are not a citizen of the European Federation</AlertTitle>
<AlertDescription>
You currently hold non-citizen status. Certain civic services and
identity documents are available only to
citizens of the European Federation.
</AlertDescription>
</Alert>
<div className="flex flex-col gap-3">
<div className="flex flex-row gap-3 w-max">
<Link href="/page/citizenship"><Button variant="secondary">Learn more about citizenship</Button></Link>
<Link href="/account/citizenship/apply"><Button>Apply for the citizenship</Button></Link>
</div>
{applications.length > 0 && <ApplicationsDialog applications={applications} />}
</div>
<Accordion type="single" collapsible>
<AccordionItem value="eligibility">
<AccordionTrigger>
<h4>Who is eligible for citizenship?</h4>
</AccordionTrigger>
<AccordionContent>
Citizenship may be granted to persons born in the European
Federation, the former Duspean Republic, or the Country of Reality,
as well as to individuals who held citizenship of the Duspean
Republic or the Country of Reality on 31 March 2026.
<br />
<br />
Foreign nationals who demonstrate a commitment to the development,
prosperity, and values of the European Federation may also be
eligible for naturalisation under federal law.
</AccordionContent>
</AccordionItem>
<AccordionItem value="rights">
<AccordionTrigger>
<h4>What rights does citizenship provide?</h4>
</AccordionTrigger>
<AccordionContent>
Citizens enjoy all rights and protections guaranteed by the
Constitution and laws of the European Federation, including the
right to obtain federal identity documents, participate in federal
elections, and receive protection from federal authorities.
</AccordionContent>
</AccordionItem>
<AccordionItem value="documents">
<AccordionTrigger>
<h4>What documents are required?</h4>
</AccordionTrigger>
<AccordionContent>
Applicants may be asked to provide proof of
residence in the European Federation, evidence of eligibility, and any additional documents
required by the competent authority.
</AccordionContent>
</AccordionItem>
<AccordionItem value="processing">
<AccordionTrigger>
<h4>How long does the application process take?</h4>
</AccordionTrigger>
<AccordionContent>
Processing times vary depending on the complexity of the
application and the volume of requests currently under review.
Applicants can track the status of their application through their
account.
</AccordionContent>
</AccordionItem>
<AccordionItem value="dual">
<AccordionTrigger>
<h4>Is dual citizenship permitted?</h4>
</AccordionTrigger>
<AccordionContent>
The European Federation generally permits dual citizenship unless
otherwise restricted by federal law or international agreements.
</AccordionContent>
</AccordionItem>
</Accordion>
</div>
</div>
</div>
<Footer />
</>
);
}