import { getTranslations, setRequestLocale } from 'next-intl/server'; import Link from 'next/link'; import { Header } from '@/components/Header'; import { Footer } from '@/components/Footer'; import { FileText, UserCheck, AlertTriangle, Scale, Trash2, RefreshCw, ArrowRight, ArrowLeft } from 'lucide-react'; import { getPageAlternates } from '@/lib/seo'; export const dynamic = 'force-dynamic'; const sectionIcons = { service: FileText, responsibilities: UserCheck, disclaimer: AlertTriangle, liability: Scale, takedown: Trash2, changes: RefreshCw, }; export async function generateMetadata({ params, }: { params: Promise<{ locale: string }>; }) { const { locale } = await params; return { alternates: getPageAlternates(locale, '/terms'), }; } export default async function TermsPage({ params, }: { params: Promise<{ locale: string }>; }) { const { locale } = await params; setRequestLocale(locale); const t = await getTranslations('terms'); const isRTL = locale === 'fa'; const ArrowIcon = isRTL ? ArrowLeft : ArrowRight; const sections = [ 'service', 'responsibilities', 'disclaimer', 'liability', 'takedown', 'changes', ] as const; return (

{t('title')}

{t('subtitle')}

{t('lastUpdated')}

{sections.map((sectionKey) => { const Icon = sectionIcons[sectionKey]; const showClaimLink = sectionKey === 'takedown'; return (

{t(`sections.${sectionKey}.title`)}

{t(`sections.${sectionKey}.description`)}

{showClaimLink && ( {locale === 'fa' ? 'صفحه مدیریت مهارت‌ها' : 'Manage Skills Page'} )}
); })}
); }