import type { Metadata } from 'next' import { getTranslations, setRequestLocale } from 'next-intl/server' import { redirect } from '@/i18n/navigation' import { getSession } from '@/lib/session' import { getGuildMasterGuilds, GUILD_RENAME_PD } from '@/lib/guild' import { PageShell } from '@/components/PageShell' import { ServiceBox } from '@/components/ServiceBox' import { RenameGuildForm } from '@/components/RenameGuildForm' 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: 'Points' }) return { title: t('renameGuild.title') } } export default async function RenameGuildPage({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('Points') const session = await getSession() if (!session.bnetId) redirect({ href: '/log-in', locale }) if (!session.username) redirect({ href: '/select-account', locale }) const guilds = await getGuildMasterGuilds(session.accountId!) return (

{t.rich('renameGuild.intro1', { s: (c) => {c} })}


{t('renameGuild.rules')}

{t('renameGuild.rule1')}

{t('renameGuild.rule2')}


{t('renameGuild.intro2')}

{t('renameGuild.intro3')}


{t('renameGuild.note')}

{t('renameGuild.noteText')}



{t.rich('renameGuild.requires', { pd: GUILD_RENAME_PD, s: (c) => {c}, y: (c) => {c}, })}


) }