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
1 changed files with 3 additions and 5 deletions

View File

@ -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}%`
}
}