'use client' import { useEffect } from 'react' import { useRouter } from 'next/navigation' import { isAuthenticated } from '@/lib/auth' import { Sidebar } from '@/components/layout/sidebar' interface DashboardLayoutProps { children: React.ReactNode title?: string description?: string } export function DashboardLayout({ children, title, description }: DashboardLayoutProps) { const router = useRouter() useEffect(() => { if (!isAuthenticated()) { router.push('/login') } }, [router]) return (
{description}
)}