import { redirect } from "next/navigation";
import { auth } from "@/auth";

export default async function HomePage(
  props: {
    params: Promise<{ lang: string }>;
  }
) {
  const params = await props.params;

  const session = await auth();
  if (session) {
    redirect(`/${params.lang}/dashboard`);
  } else {
    redirect(`/${params.lang}/login`);
  }
}
