import { getTranslations } from 'next-intl/server' import { redirect } from '@/i18n/navigation' import { getSession } from '@/lib/session' import { getGameCharacters } from '@/lib/characters' import { getStoreBalances } from '@/lib/store' import { wowheadWotlkHome } from '@/lib/wowhead' import { PageShell } from '@/components/PageShell' import { ServiceBox } from '@/components/ServiceBox' import { StoreBrowser } from '@/components/StoreBrowser' import { StoreNews } from '@/components/StoreNews' /** * Contenido de la tienda. Vive aquí y no en una ruta propia porque la URL lleva * el reino (`/store-`, como el original) y eso lo resuelve la ruta * dinámica `[realm]`, igual que /-realm y /-players. */ export async function StorePage({ locale, realm }: { locale: string; realm: string }) { const session = await getSession() if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const [chars, balances] = await Promise.all([ getGameCharacters(session.accountId!), getStoreBalances(session.accountId!), ]) const t = await getTranslations('Store') return ( {t('title')} - {realm.toUpperCase()}}>

{t('infoTooltip')}

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


({ name: c.name, classCss: c.classCss }))} dp={balances.dp} vp={balances.vp} realm={realm} />
) }