mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 15:33:22 +00:00
fix: Division par 0
This commit is contained in:
@ -150,7 +150,11 @@ export default function DashboardPage() {
|
||||
/>
|
||||
<StatCard
|
||||
title={t('capacityRate')}
|
||||
value={`${((totalStudents / selectedEstablishmentTotalCapacity) * 100).toFixed(1)}%`}
|
||||
value={
|
||||
selectedEstablishmentTotalCapacity > 0
|
||||
? `${((totalStudents / selectedEstablishmentTotalCapacity) * 100).toFixed(1)}%`
|
||||
: 0
|
||||
}
|
||||
icon={<School className="text-orange-500" size={24} />}
|
||||
color="orange"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user