import { ReactNode } from "react"; import { useLocation } from "react-router-dom"; import { Header } from "@/components/header"; interface MainLayoutProps { children: ReactNode; } export function MainLayout({ children }: MainLayoutProps) { const location = useLocation(); // Exclure le layout pour les pages d'authentification const authPages = ["/auth/login", "/auth/register"]; if (authPages.includes(location.pathname)) { return <>{children}; } return (
{children}
); }