import { getTranslations, setRequestLocale } from 'next-intl/server' import { getSession } from '@/lib/session' import { getRealmName } from '@/lib/realm' import { getVoteSitesForAccount } from '@/lib/vote' import { PageShell } from '@/components/PageShell' import { ServiceBox } from '@/components/ServiceBox' import { VotePanel } from '@/components/VotePanel' export const dynamic = 'force-dynamic' export default async function VotePointsPage({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('Vote') const session = await getSession() const [realm, sites] = await Promise.all([getRealmName(), getVoteSitesForAccount(session.accountId ?? 0)]) const sub = (s: string) => s.replaceAll('{server}', realm) const sections = t.raw('infoSections') as { h: string; lines: string[] }[] return (
{sections.map((s, i) => (
{sub(s.h)} {s.lines.map((l, j) => (

{sub(l)}

))} {i < sections.length - 1 && ( <>


)}
))}

{t('sitesTitle')}

) }