mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Suite de la gestion des sessions
This commit is contained in:
@ -26,6 +26,8 @@ import {
|
||||
|
||||
import { disconnect } from '@/app/lib/authAction';
|
||||
import { fetchEstablishment } from '@/app/lib/schoolAction';
|
||||
import ProtectedRoute from '@/components/ProtectedRoute';
|
||||
import { SessionProvider } from 'next-auth/react';
|
||||
|
||||
export default function Layout({
|
||||
children,
|
||||
@ -73,6 +75,9 @@ export default function Layout({
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<SessionProvider>
|
||||
<ProtectedRoute>
|
||||
{!isLoading && (
|
||||
<div className="flex min-h-screen bg-gray-50">
|
||||
<Sidebar establishment={establishment} currentPage={currentPage} items={Object.values(sidebarItems)} className="h-full" />
|
||||
@ -105,6 +110,9 @@ export default function Layout({
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
</ProtectedRoute>
|
||||
</SessionProvider>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user