import Crown from '@/components/Crown' export function RMGPSVG (){ return (
) } async function getData(id) { const res = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/api/public/content/index/${id}`) if (!res.ok) { throw new Error('Failed to fetch data') } return res.json() } export default async function Footer({ lang }){ const data = await getData(lang === 'fa' ? 1 : 2); // Add safety checks for data structure if (!data || typeof data !== 'object') { console.error('Footer: Invalid data received from API'); return null; } return (
{ data.footerHead?.[0]?.body || '' }

{ data.footerDesc?.[0]?.body || '' }

{ data.footerFollow?.[0]?.body || '' }
{ data.footerService?.[0]?.body || '' } لیست خدمات لیست خدمات لیست خدمات لیست خدمات لیست خدمات
{ data.footerService?.[0]?.body || '' } لیست محصولات لیست محصولات لیست محصولات لیست محصولات لیست محصولات
{ data.footerContact?.[0]?.body || '' }
{ data.footerEmail?.[0]?.body || '' }
{ data.footerPhone?.[0]?.body || '' }
{ data.footerAddress?.[0]?.body || '' }
) }