import { notFound } from 'next/navigation' import { getTranslations, setRequestLocale } from 'next-intl/server' import { Link } from '@/i18n/navigation' import { getForum, getTopics } from '@/lib/forum' export const dynamic = 'force-dynamic' export default async function ForumPage({ params, }: { params: Promise<{ locale: string; forumId: string }> }) { const { locale, forumId } = await params setRequestLocale(locale) const t = await getTranslations('Forum') const id = Number(forumId) const forum = await getForum(id) if (!forum) notFound() const topics = await getTopics(id) return (

← {t('backToForum')}

{forum!.name}

{forum!.description &&

{forum!.description}

} {topics.length === 0 ? (

{t('noTopics')}

) : ( )}
) }