diff --git a/src/pages/Home/sections/RiskSection.tsx b/src/pages/Home/sections/RiskSection.tsx index 64227b8..1b46679 100644 --- a/src/pages/Home/sections/RiskSection.tsx +++ b/src/pages/Home/sections/RiskSection.tsx @@ -161,6 +161,65 @@ const T = { }, } +/* ─── Shared card ───────────────────────────────────────── */ +function RiskCard({ + item, cfg, lang, idx, mobile, +}: { + item: RiskItem + cfg: { dot: string; label: string; bg: string } + lang: 'fa' | 'en' + idx: number + mobile?: boolean +}) { + const text = lang === 'en' && item.quoteEn ? item.quoteEn : item.quote + const name = lang === 'en' && item.nameEn ? item.nameEn : item.name + const date = lang === 'en' && item.dateEn ? item.dateEn : item.date + + return ( +
+ {text} +
+ +- {lang === 'en' && item.quoteEn ? item.quoteEn : item.quote} -
- -