19 lines
716 B
TypeScript
19 lines
716 B
TypeScript
import { cookies } from "next/headers";
|
|
import { AdminDashboard } from "@/components/admin-dashboard";
|
|
import { validAdminToken, COOKIE_NAME } from "@/lib/admin-auth";
|
|
import { DocumentLanguageSync } from "@/components/document-language-sync";
|
|
import "./dashboard.css";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
export const metadata = { title: "لوحة إدارة الموقع", robots: { index: false, follow: false } };
|
|
|
|
export default function AdminPage() {
|
|
const authenticated = validAdminToken(cookies().get(COOKIE_NAME)?.value);
|
|
return (
|
|
<div lang="ar" dir="rtl">
|
|
<DocumentLanguageSync language="ar" dir="rtl" />
|
|
<AdminDashboard initiallyAuthenticated={authenticated} />
|
|
</div>
|
|
);
|
|
}
|