prod
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import Footer from "@/components/footer";
|
||||
import Header from "@/components/header";
|
||||
import { getCurrentUser } from "@/lib/user";
|
||||
import { redirect } from "next/navigation";
|
||||
import { AccountMenu } from "../account-menu";
|
||||
@@ -17,30 +15,26 @@ export default async function Citizenship() {
|
||||
const pendingCount = user.isAdmin ? await getPendingApplicationsCount() : 0
|
||||
|
||||
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>
|
||||
<div className="flex flex-col md:flex-row p-4 md:p-16 gap-8 md:gap-16 mb-4 md:mb-0">
|
||||
<AccountMenu />
|
||||
<div className="flex flex-col gap-8 max-w-lg">
|
||||
<div className="flex flex-col gap-6 md:w-min">
|
||||
<h2>Citizenship</h2>
|
||||
|
||||
{citizenship ? <HasCitizenship userId={user.id} /> : <NoCitizenship userId={user.id} />}
|
||||
{citizenship ? <HasCitizenship userId={user.id} /> : <NoCitizenship userId={user.id} />}
|
||||
|
||||
{user.isAdmin && (
|
||||
<Link href="/account/citizenship/review">
|
||||
<Button variant="secondary" className="w-full">
|
||||
Review citizenship applications
|
||||
<div className="flex items-center justify-center bg-black/50 text-white w-3.5 h-3.5 text-xs rounded-full">
|
||||
{pendingCount}
|
||||
</div>
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
{user.isAdmin && (
|
||||
<Link href="/account/citizenship/review">
|
||||
<Button variant="secondary" className="w-full">
|
||||
Review citizenship applications
|
||||
<div className="flex items-center justify-center bg-black/50 text-white w-3.5 h-3.5 text-xs rounded-full">
|
||||
{pendingCount}
|
||||
</div>
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<Footer />
|
||||
</>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user