Skip to content

Commit

Permalink
fix: pourcent numeros certify when 0 numeros
Browse files Browse the repository at this point in the history
  • Loading branch information
fufeck committed Sep 11, 2024
1 parent 3c7b339 commit 62a95f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/bal/certification-infos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ function CertificationInfos({ openRecoveryDialog }: CertificationInfosProps) {
const [isInfosShown, setIsInfosShown] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const { nbNumeros, nbNumerosCertifies } = baseLocale;
const percentCertified = Math.round((nbNumerosCertifies * 100) / nbNumeros);
const percentCertified =
nbNumeros > 0 ? Math.round((nbNumerosCertifies * 100) / nbNumeros) : 0;

// Reload base local when the tab is mounted to be sure to have the updated number
// of certified adresses
Expand Down

0 comments on commit 62a95f5

Please sign in to comment.