import type { Metadata } from 'next' import { NoteLegend } from '@/components/NoteLegend' import { getTranslations, setRequestLocale } from 'next-intl/server' import { redirect, Link } from '@/i18n/navigation' import { getSession } from '@/lib/session' import { getGameCharacters } from '@/lib/characters' import { getDPointsBalance } from '@/lib/dpoints' import { getTransferPrice } from '@/lib/prices' import { PageShell } from '@/components/PageShell' import { ServiceBox } from '@/components/ServiceBox' import { TransferForm } from '@/components/TransferForm' export const dynamic = 'force-dynamic' export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: 'CharService' }) return { title: t('transfer.pageTitle') } } export default async function TransferCharacterPage({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('CharService') const session = await getSession() if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, price, pdBalance] = await Promise.all([ getGameCharacters(session.accountId!), getTransferPrice(), getDPointsBalance(session.accountId!), ]) return (

{t.rich('transfer.intro', { s: (c) => {c} })}


{t.rich('transfer.dkHeading', { dk: (c) => {c} })}

{t('transfer.dkCond1')}

{t('transfer.dkCond2')}


{t('transfer.securityLock')}


{t('transfer.buttonExplain')}

{t('transfer.afterTransfer')}


{t.rich('transfer.securityTokenHint', { link: (c) => {c} })}

{t.rich('transfer.twoFaHint', { link: (c) => {c} })}


{t('transfer.noteOffline')}

{t('transfer.noteIrreversible')}



{t.rich('transfer.requires', { price, s: (c) => {c}, e: (c) => {c} })}

({ name: c.name, classCss: c.classCss }))} price={price} pdBalance={pdBalance} />
) }