import { useAuthStore } from '../store/auth'
import AdminDashboard from '../components/dashboard/AdminDashboard'
import ClientDashboard from '../components/dashboard/ClientDashboard'

export default function DashboardPage() {
  const user = useAuthStore((s) => s.user)
  const isPrivileged = user?.role === 'admin' || user?.role === 'project_manager'
  return isPrivileged ? <AdminDashboard /> : <ClientDashboard />
}
