Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
)
/*
* - The selected installment will be the one with the highest `NumberOfInstallments`;
* - If there is no 'interest-free' installments, the normal installments will be analyzed.
*/
const installment = (isEmpty(noInterestRateInstallments)
? installments
: noInterestRateInstallments
).reduce((previous, current) =>
previous.NumberOfInstallments > current.NumberOfInstallments
? previous
: current
)
const formattedInstallmentPrice = formatCurrency({
intl,
culture,
value: installment.Value,
})
const [installmentsElement, installmentPriceElement, timesElement] = [
installment.NumberOfInstallments,
formattedInstallmentPrice,
x,
].map((element, index) => (
<span>
{element}
</span>
))
return (