NeahNew/app/groups/page.tsx
2025-05-05 13:04:01 +02:00

24 lines
614 B
TypeScript

import { getServerSession } from "next-auth/next";
import { authOptions } from "@/app/api/auth/options";
import { redirect } from "next/navigation";
import { GroupsTable } from "@/components/groups/groups-table";
export const metadata = {
title: "Enkun - Groupes",
};
export default async function GroupsPage() {
const session = await getServerSession(authOptions);
if (!session) {
redirect("/signin");
}
return (
<div className='min-h-screen bg-black'>
<div className='container mx-auto py-10'>
<GroupsTable userRole={session.user.role || []} />
</div>
</div>
);
}