Initial commit

This commit is contained in:
twotalesanimation
2026-06-11 10:46:09 +02:00
commit 81ad7e4ea9
223 changed files with 39530 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// app/admin/users/[userId]/page.tsx
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth-options';
import { redirect } from 'next/navigation';
import UserDetailClient from './user-detail-client';
export default async function UserDetailPage({
params,
}: {
params: Promise<{ userId: string }>;
}) {
const session = await getServerSession(authOptions);
const role = (session as any)?.user?.role ?? null;
if (!session?.user) {
redirect('/login');
}
if (!(role === 'admin' || role === 'superadmin')) {
redirect('/dashboard');
}
const { userId } = await params;
return <UserDetailClient userId={userId} />;
}