refacto(db): remove localstorage service

This commit is contained in:
Julien Froidefond
2025-02-14 21:40:04 +01:00
parent 85eeae0a1b
commit d7bed4df6d
5 changed files with 4 additions and 268 deletions

View File

@@ -17,16 +17,6 @@ export default function ClientLayout({ children }: { children: React.ReactNode }
const router = useRouter();
const pathname = usePathname();
// Vérification de l'authentification
useEffect(() => {
const isPublicRoute = publicRoutes.includes(pathname);
const isAuthenticated = authService.isAuthenticated();
if (!isAuthenticated && !isPublicRoute) {
router.push(`/login?from=${encodeURIComponent(pathname)}`);
}
}, [pathname, router]);
const handleCloseSidebar = () => {
setIsSidebarOpen(false);
};