diff --git a/src/utilities.ts b/src/utilities.ts index 3881daba..2db499a0 100644 --- a/src/utilities.ts +++ b/src/utilities.ts @@ -60,13 +60,11 @@ export const formatToFixed4 = (value: string) => { } export const getHeightPercentages = (amountOfElements: number) => { - let percentages + let percentages = 100 - if (amountOfElements === 1) { - percentages = 100 - } else { + if (amountOfElements > 1) { percentages = 100 / amountOfElements } return `${percentages}%` -} \ No newline at end of file +}