This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { MotionFade } from "@/components/motion-fade";
|
||||
import { AdminDashboardShell } from "@/components/admin/admin-dashboard-shell";
|
||||
import { clearAdminSessionCookie, isAdminAuthenticated } from "@/lib/admin-auth";
|
||||
import { UiKitShowcase } from "@/components/ui/ui-kit-showcase";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
const copy = {
|
||||
title: "UI Kit",
|
||||
subtitle: "Globale Referenz fuer das visuelle System im Admin Bereich.",
|
||||
maintenance: "Wartungsmodus",
|
||||
overview: "Uebersicht",
|
||||
uiKit: "UI Kit",
|
||||
media: "Media",
|
||||
siteSettings: "Settings",
|
||||
portfolio: "Portfolio",
|
||||
logout: "Ausloggen",
|
||||
backToSite: "Zur Website",
|
||||
};
|
||||
|
||||
export default async function AdminUiKitPage() {
|
||||
const authenticated = await isAdminAuthenticated();
|
||||
|
||||
if (!authenticated) {
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
async function logoutAction() {
|
||||
"use server";
|
||||
|
||||
await clearAdminSessionCookie();
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
return (
|
||||
<AdminDashboardShell
|
||||
copy={copy}
|
||||
active="ui-kit"
|
||||
logoutAction={logoutAction}
|
||||
headerTitle={copy.title}
|
||||
headerDescription={copy.subtitle}
|
||||
>
|
||||
<MotionFade delay={0.1}>
|
||||
<UiKitShowcase localeKey="de" />
|
||||
</MotionFade>
|
||||
</AdminDashboardShell>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user