import { redirect } from 'next/navigation';
import { getCurrentAdmin } from '@/lib/actions/auth';

export default async function IndexPage() {
  const user = await getCurrentAdmin();
  
  if (user) {
    redirect('/dashboard');
  } else {
    redirect('/login');
  }
}
