import { getTranslations, setRequestLocale } from 'next-intl/server' import { redirect } from '@/i18n/navigation' import { getSession } from '@/lib/session' import { getGameCharacters } from '@/lib/characters' import { getRenamePrice } from '@/lib/prices' import { PaidServiceForm } from '@/components/PaidServiceForm' export const dynamic = 'force-dynamic' export default async function RenamePage({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('Rename') const session = await getSession() if (!session.bnetId) redirect({ href: '/login', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price] = await Promise.all([getGameCharacters(session.accountId!), getRenamePrice()]) return (

{t('title')}

c.name)} checkoutEndpoint="/api/character/rename/checkout" payLabel={t('pay', { price })} />
) }