import { setRequestLocale } from 'next-intl/server'
import { ActivateClient } from './ActivateClient'

export default async function ActivatePage({
  params,
  searchParams,
}: {
  params: Promise<{ locale: string }>
  searchParams: Promise<{ act?: string }>
}) {
  const { locale } = await params
  setRequestLocale(locale)
  const { act } = await searchParams

  return (
    <main className="mx-auto max-w-lg px-4 py-12">
      <ActivateClient hash={act ?? ''} />
    </main>
  )
}
