import { Suspense } from "react";
import { setRequestLocale } from "next-intl/server";
import { Login2FaForm } from "@/components/auth/login-2fa-form";

interface Login2FaPageProps {
  params: Promise<{ locale: string }>;
}

export default async function Login2FaPage({ params }: Login2FaPageProps) {
  const { locale } = await params;
  setRequestLocale(locale);

  return (
    <div className="mx-auto flex min-h-[calc(100vh-8rem)] max-w-6xl items-center justify-center px-4 py-12 sm:px-6">
      <Suspense>
        <Login2FaForm />
      </Suspense>
    </div>
  );
}
