fix: utilities format and change height func

This commit is contained in:
RadoslavDimchev 2023-10-18 08:37:56 +03:00
parent ab73b7ef03
commit 07d9509db7

View File

@ -60,13 +60,11 @@ export const formatToFixed4 = (value: string) => {
} }
export const getHeightPercentages = (amountOfElements: number) => { export const getHeightPercentages = (amountOfElements: number) => {
let percentages let percentages = 100
if (amountOfElements === 1) { if (amountOfElements > 1) {
percentages = 100
} else {
percentages = 100 / amountOfElements percentages = 100 / amountOfElements
} }
return `${percentages}%` return `${percentages}%`
} }