fix: utilities format and change height func
This commit is contained in:
parent
ab73b7ef03
commit
07d9509db7
|
@ -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}%`
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue