only display TradePrice usdcPrice if available (#2613)

This commit is contained in:
Justin Domingue 2021-10-14 10:15:17 -04:00 committed by GitHub
parent e4b727f6f0
commit 0b8afcff41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,9 +48,11 @@ export default function TradePrice({ price, showInverted, setShowInverted }: Tra
<Text fontWeight={500} fontSize={14} color={theme.text1}> <Text fontWeight={500} fontSize={14} color={theme.text1}>
{text} {text}
</Text>{' '} </Text>{' '}
<TYPE.darkGray> {usdcPrice && (
<Trans>(${usdcPrice?.toSignificant(6, { groupSeparator: ',' })})</Trans> <TYPE.darkGray>
</TYPE.darkGray> <Trans>(${usdcPrice.toSignificant(6, { groupSeparator: ',' })})</Trans>
</TYPE.darkGray>
)}
</StyledPriceContainer> </StyledPriceContainer>
) )
} }