import { getTranslations, setRequestLocale } from 'next-intl/server' import { redirect, Link } from '@/i18n/navigation' import { getSession } from '@/lib/session' import { isAdmin } from '@/lib/admin' import { listVoteSites } from '@/lib/admin-votes' import { PageShell } from '@/components/PageShell' import { AdminVotesManager } from '@/components/AdminVotesManager' export const dynamic = 'force-dynamic' export default async function AdminVotesPage({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('Admin') const session = await getSession() if (!session.bnetId) redirect({ href: '/login', locale }) if (!(await isAdmin(session))) redirect({ href: '/', locale }) const sites = await listVoteSites() return (
{t('backToPanel')}
) }