Fix: TypeScript error in ChartCard

Error: 'percent' is possibly 'undefined'
Fix: (percent || 0) para garantir fallback

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 18:23:44 +00:00
parent 45a014b717
commit 0f293fdd8c

View File

@@ -163,7 +163,7 @@ export function ChartCard({
cx="50%" cx="50%"
cy="50%" cy="50%"
labelLine={false} labelLine={false}
label={({ name, percent }) => `${name} (${(percent * 100).toFixed(0)}%)`} label={({ name, percent }) => `${name} (${((percent || 0) * 100).toFixed(0)}%)`}
outerRadius={100} outerRadius={100}
fill="#8884d8" fill="#8884d8"
dataKey={dataKey} dataKey={dataKey}