Files
MAD-Platform/app/dashboard/calendrier/page.tsx

27 lines
741 B
TypeScript
Raw Normal View History

2026-01-21 17:34:48 +01:00
import { redirect } from 'next/navigation';
import { getCurrentUser } from '@/lib/auth';
2026-01-22 18:53:23 +01:00
import { hasPageAccess } from '@/lib/permissions';
2026-01-21 17:34:48 +01:00
import DashboardLayout from '@/components/DashboardLayout';
import CalendrierPageContent from '@/components/CalendrierPageContent';
export default async function CalendrierPage() {
const user = await getCurrentUser();
if (!user) {
redirect('/login');
}
2026-01-22 18:53:23 +01:00
const hasAccess = await hasPageAccess(user.id, '/dashboard/calendrier');
if (!hasAccess) {
redirect('/dashboard/parametres');
}
2026-01-21 17:34:48 +01:00
return (
<DashboardLayout user={user}>
2026-02-16 19:03:56 +01:00
<div className="px-3 py-4 sm:p-6 lg:p-8 min-w-0 overflow-x-hidden">
2026-01-21 17:34:48 +01:00
<CalendrierPageContent />
</div>
</DashboardLayout>
);
}