import { redirect } from 'next/navigation'

import { getCurrentUser, homePathFor } from '@/lib/auth/current-user'

/**
 * Role router. Different roles need different first screens (§21 vs §22), so rather than
 * one dashboard that tries to serve everyone, /dashboard forwards to the right one.
 */
export default async function DashboardPage() {
  const user = await getCurrentUser()
  redirect(homePathFor(user))
}
