From 3e74d7bacf7a67de73e00aea21a5cff85bc8a35d Mon Sep 17 00:00:00 2001 From: Majorfi Date: Thu, 19 Dec 2024 10:47:52 +0100 Subject: [PATCH] fix: display of risk/overflow --- .../details/tabs/VaultDetailsStrategies.tsx | 17 +++++---- .../components/list/VaultsV3ListHead.tsx | 4 +-- .../components/list/VaultsV3ListRow.tsx | 36 +++++++++---------- pages/v3/index.tsx | 10 +++--- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx b/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx index dee48413c..d63f50ff3 100755 --- a/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx +++ b/apps/vaults-v3/components/details/tabs/VaultDetailsStrategies.tsx @@ -85,27 +85,32 @@ export function VaultDetailsStrategies({currentVault}: {currentVault: TYDaemonVa
-
+
{ + if (newSortDirection === '') { + onChangeSortBy('featuringScore'); + onChangeSortDirection(''); + return; + } onChangeSortBy(newSortBy as TPossibleSortBy); onChangeSortDirection(newSortDirection as TSortDirection); }} items={[ - {label: 'Vault', value: 'name', sortable: true, className: 'col-span-2'}, + {label: 'Vault', value: 'name', sortable: true, className: 'col-span-4'}, + {label: 'Est. APY', value: 'estAPY', sortable: true, className: 'col-span-2'}, + {label: 'Hist. APY', value: 'APY', sortable: true, className: 'col-span-2'}, { label: 'Risk Level', value: 'score', sortable: true, - className: 'col-span-1 text-nowrap' + className: 'col-span-2 whitespace-nowrap' }, - {label: 'Est. APY', value: 'estAPY', sortable: true, className: 'col-span-2'}, - {label: 'Hist. APY', value: 'APY', sortable: true, className: 'col-span-2'}, {label: 'Available', value: 'available', sortable: true, className: 'col-span-2'}, {label: 'Holdings', value: 'deposited', sortable: true, className: 'col-span-2'}, - {label: 'Deposits', value: 'tvl', sortable: true, className: 'col-span-2'} + {label: 'Deposits', value: 'tvl', sortable: true, className: 'col-span-2 justify-end'} ]} />
diff --git a/apps/vaults-v3/components/list/VaultsV3ListHead.tsx b/apps/vaults-v3/components/list/VaultsV3ListHead.tsx index 131537841..a739693d3 100644 --- a/apps/vaults-v3/components/list/VaultsV3ListHead.tsx +++ b/apps/vaults-v3/components/list/VaultsV3ListHead.tsx @@ -77,9 +77,7 @@ export function VaultsV3ListHead({items, sortBy, sortDirection, onSort}: TListHe
-
- -
+
{rest.map( (item, index): ReactElement => (