import { getTranslations, setRequestLocale } from 'next-intl/server' import { Link } from '@/i18n/navigation' import { getForumIndex } from '@/lib/forum' export const dynamic = 'force-dynamic' export default async function ForumIndexPage({ params }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations('Forum') const categories = await getForumIndex() return (

{t('title')}

{categories.length === 0 ? (

{t('noForums')}

) : ( categories.map((cat) => (

{cat.name}

)) )}
) }