feat: fixed and separate total price

This commit is contained in:
RadoslavDimchev 2023-09-26 22:32:39 +03:00
parent c701635942
commit 9c7e65a210

View File

@ -18,6 +18,7 @@ const Validators = ({
changeValidatorCountHandler, changeValidatorCountHandler,
}: ValidatorsProps) => { }: ValidatorsProps) => {
const [currency, setCurrency] = useState(CURRENCIES[0]) const [currency, setCurrency] = useState(CURRENCIES[0])
const totalPrice = (validatorCount * currency.price).toFixed(2)
return ( return (
<XStack justifyContent={'space-between'} width={'80%'}> <XStack justifyContent={'space-between'} width={'80%'}>
@ -62,7 +63,7 @@ const Validators = ({
</XStack> </XStack>
<Text size={27} weight={'semibold'}> <Text size={27} weight={'semibold'}>
{currency.symbol} {currency.symbol}
{validatorCount * currency.price} {currency.name} {totalPrice} {currency.name}
</Text> </Text>
</YStack> </YStack>
</XStack> </XStack>