'use client'; import { AuthProvider } from '@/contexts/AuthContext'; import AuthGuard from '@/components/AuthGuard'; import Sidebar from '@/components/admin/Sidebar'; import ToastContainer from '@/components/Toast'; import { usePathname } from 'next/navigation'; export default function AdminLayout({ children, }: { children: React.ReactNode; }) { const pathname = usePathname(); const isLogin = pathname === '/admin/login' || pathname === '/admin/login/'; return (
{isLogin ? ( children ) : (
{children}
)}
); }