fix sorting 24h price change in markets table (#152)

This commit is contained in:
aleka 2023-11-13 09:36:32 -05:00 committed by GitHub
parent 50bd860ced
commit 0def18db07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,19 +96,19 @@ export const MarketsTable = ({ className }: { className?: string }) => {
),
},
{
columnKey: 'priceChange24H',
getCellValue: (row) => row.priceChange24H,
columnKey: 'priceChange24HPercent',
getCellValue: (row) => row.priceChange24HPercent,
label: stringGetter({ key: STRING_KEYS.CHANGE_24H }),
renderCell: ({ priceChange24H, priceChange24HPercent, tickSizeDecimals }) => (
<TableCell stacked>
<Styled.InlineRow>
{!priceChange24H ? (
{!priceChange24HPercent ? (
<Output type={OutputType.Text} value={null} />
) : (
<Styled.Output
type={OutputType.Percent}
value={MustBigNumber(priceChange24HPercent).abs()}
isNegative={MustBigNumber(priceChange24H).isNegative()}
isNegative={MustBigNumber(priceChange24HPercent).isNegative()}
/>
)}
</Styled.InlineRow>