fix: remove the function to get the values when editing balance alerts
This commit is contained in:
parent
cdab60069c
commit
410bc25afb
1 changed files with 8 additions and 5 deletions
|
|
@ -42,9 +42,6 @@ const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => {
|
||||||
.nullable()
|
.nullable()
|
||||||
})
|
})
|
||||||
|
|
||||||
const getPercentage = fillingPercentage =>
|
|
||||||
fillingPercentage ?? data?.fillingPercentageCassette1
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Formik
|
<Formik
|
||||||
validateOnBlur={false}
|
validateOnBlur={false}
|
||||||
|
|
@ -76,7 +73,10 @@ const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => {
|
||||||
<Cashbox
|
<Cashbox
|
||||||
labelClassName={classes.cashboxLabel}
|
labelClassName={classes.cashboxLabel}
|
||||||
emptyPartClassName={classes.cashboxEmptyPart}
|
emptyPartClassName={classes.cashboxEmptyPart}
|
||||||
percent={getPercentage(values.fillingPercentageCassette1)}
|
percent={
|
||||||
|
values.fillingPercentageCassette1 ??
|
||||||
|
data?.fillingPercentageCassette1
|
||||||
|
}
|
||||||
inFiatBalanceAlerts={true}
|
inFiatBalanceAlerts={true}
|
||||||
cashOut
|
cashOut
|
||||||
/>
|
/>
|
||||||
|
|
@ -97,7 +97,10 @@ const FiatBalance = ({ section, min = 0, max = 100, fieldWidth = 80 }) => {
|
||||||
<Cashbox
|
<Cashbox
|
||||||
labelClassName={classes.cashboxLabel}
|
labelClassName={classes.cashboxLabel}
|
||||||
emptyPartClassName={classes.cashboxEmptyPart}
|
emptyPartClassName={classes.cashboxEmptyPart}
|
||||||
percent={getPercentage(values.fillingPercentageCassette2)}
|
percent={
|
||||||
|
values.fillingPercentageCassette2 ??
|
||||||
|
data?.fillingPercentageCassette2
|
||||||
|
}
|
||||||
inFiatBalanceAlerts={true}
|
inFiatBalanceAlerts={true}
|
||||||
cashOut
|
cashOut
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue