import { redirect } from 'next/navigation';
import { getSession } from '@/lib/session';
import MainClient from './MainClient';

export default async function HomePage() {
  const session = await getSession();
  if (!session) redirect('/login');

  return <MainClient username={session.username} />;
}
