fix: unused variable and code simplification
This commit is contained in:
parent
d09cf61c86
commit
58d6a41505
1 changed files with 12 additions and 16 deletions
|
|
@ -120,16 +120,12 @@ const WizardStep = ({
|
||||||
denomination: step === 2 ? cashoutSettings.top : cashoutSettings.bottom
|
denomination: step === 2 ? cashoutSettings.top : cashoutSettings.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
const getPercentage = values =>
|
const getPercentage = values => {
|
||||||
R.clamp(
|
const cassetteCount =
|
||||||
0,
|
step === 2 ? values.cassette1Count : values.cassette2Count
|
||||||
100,
|
const value = cassetteCount ?? cassetteInfo.amount
|
||||||
(100 *
|
return R.clamp(0, 100, 100 * (value / cassetteCapacity))
|
||||||
(step === 2
|
}
|
||||||
? values.cassette1Count ?? cassetteInfo.amount
|
|
||||||
: values.cassette2Count ?? cassetteInfo.amount)) /
|
|
||||||
cassetteCapacity
|
|
||||||
)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.content}>
|
<div className={classes.content}>
|
||||||
|
|
@ -173,7 +169,12 @@ const WizardStep = ({
|
||||||
classes.centerAlignment
|
classes.centerAlignment
|
||||||
)}>
|
)}>
|
||||||
<P>Since previous update</P>
|
<P>Since previous update</P>
|
||||||
<Tooltip>Insert tooltip text here.</Tooltip>
|
<Tooltip width={215}>
|
||||||
|
<P>
|
||||||
|
Number of bills inside the cashbox, since the last
|
||||||
|
cashbox changes.
|
||||||
|
</P>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={classnames(
|
className={classnames(
|
||||||
|
|
@ -185,11 +186,6 @@ const WizardStep = ({
|
||||||
</Info1>
|
</Info1>
|
||||||
<P noMargin>accepted bills</P>
|
<P noMargin>accepted bills</P>
|
||||||
</div>
|
</div>
|
||||||
{steps[step - 1].fiatAmount && (
|
|
||||||
<P noMargin className={classes.fiatTotal}>
|
|
||||||
= {steps[step - 1].fiatAmount} {fiatCurrency}
|
|
||||||
</P>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue