import { getTranslations, setRequestLocale } from 'next-intl/server'
import { PageShell } from '@/components/PageShell'
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
  const t = await getTranslations('Activate')

  return (
    <PageShell title={t('title')}>
      <div className="box-content">
        <div className="body-box-content centered">
          <ActivateClient hash={act ?? ''} />
        </div>
      </div>
    </PageShell>
  )
}
