From 2185b0107ad9c753494c1e0b6b99b99321745816 Mon Sep 17 00:00:00 2001 From: Davide Segullo Date: Mon, 15 Apr 2024 15:27:58 +0200 Subject: [PATCH] feat: :sparkles: improve markets losers search --- src/views/tables/MarketsCompactTable.tsx | 28 +++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/views/tables/MarketsCompactTable.tsx b/src/views/tables/MarketsCompactTable.tsx index 4e47507b7..7d506d6b7 100644 --- a/src/views/tables/MarketsCompactTable.tsx +++ b/src/views/tables/MarketsCompactTable.tsx @@ -143,6 +143,12 @@ export const MarketsCompactTable = (props: PropsWithChildren !!market.priceChange24HPercent && market.priceChange24HPercent < 0) + .sort(sortingFunction); + } + return filteredMarkets.sort(sortingFunction); }, [sorting, filteredMarkets]); @@ -219,8 +225,16 @@ Styled.Table = styled(Table)` @media ${breakpoints.desktopSmall} { --tableCell-padding: 0.5rem 0.5rem; + & tr > td:nth-child(1) { + --tableCell-padding: 0.5rem 0.5rem; + } + & tr > td:nth-child(2) { - --tableCell-padding: 0.625rem 0; + --tableCell-padding: 0.5rem 0; + } + + & tr > td:nth-child(3) { + --tableCell-padding: 0.5rem 0.5rem; } } @@ -228,6 +242,18 @@ Styled.Table = styled(Table)` table { max-width: 100vw; } + + & tr > td:nth-child(1) { + --tableCell-padding: 0.5rem 0.625rem 0.5rem 1rem; + } + + & tr > td:nth-child(2) { + --tableCell-padding: 0.5rem 0; + } + + & tr > td:nth-child(3) { + --tableCell-padding: 0.5rem 1rem 0.5rem 0.625rem; + } } `;