import { getTranslations, setRequestLocale } from 'next-intl/server'; import Link from 'next/link'; import { Header } from '@/components/Header'; import { Footer } from '@/components/Footer'; import { Shield, Database, Cookie, Users, Lock, Mail, ArrowRight, ArrowLeft } from 'lucide-react'; import { getPageAlternates } from '@/lib/seo'; export const dynamic = 'force-dynamic'; const sectionIcons = { dataCollected: Database, cookies: Cookie, thirdParty: Users, retention: Lock, rights: Shield, contact: Mail, }; export async function generateMetadata({ params, }: { params: Promise<{ locale: string }>; }) { const { locale } = await params; return { alternates: getPageAlternates(locale, '/privacy'), }; } export default async function PrivacyPage({ params, }: { params: Promise<{ locale: string }>; }) { const { locale } = await params; setRequestLocale(locale); const t = await getTranslations('privacy'); const isRTL = locale === 'fa'; const ArrowIcon = isRTL ? ArrowLeft : ArrowRight; const sections = [ 'dataCollected', 'cookies', 'thirdParty', 'retention', 'rights', 'contact', ] as const; return (

{t('title')}

{t('subtitle')}

{t('lastUpdated')}

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

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

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

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