From 0d9262339931bebbfaeec176818e19a449c18985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Ram=C3=ADrez?= Date: Mon, 21 Oct 2024 20:27:24 -0300 Subject: [PATCH] fix(token-selector): show empty message when no token match filter --- .../Global/TokenSelector/TokenSelector.tsx | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/components/Global/TokenSelector/TokenSelector.tsx b/src/components/Global/TokenSelector/TokenSelector.tsx index 4d09c5bb..8c94e7d1 100644 --- a/src/components/Global/TokenSelector/TokenSelector.tsx +++ b/src/components/Global/TokenSelector/TokenSelector.tsx @@ -21,36 +21,18 @@ import { CrispButton } from '@/components/CrispChat' const TokenList = ({ balances, setToken }: { balances: IUserBalance[]; setToken: (address: IUserBalance) => void }) => { const { selectedChainID, selectedTokenAddress } = useContext(context.tokenSelectorContext) - const { hasFetchedBalances } = useBalance() const [tokenPlaceholders, setTokenPlaceholders] = useState<{ [key: string]: boolean }>({}) const [chainPlaceholders, setChainPlaceholders] = useState<{ [key: string]: boolean }>({}) return ( - {hasFetchedBalances && balances.length === 0 ? ( + {balances.length === 0 ? ( - - ) : balances.length === 0 ? ( - [1, 2, 3, 4].map((_, idx) => ( - - - - - - - )) ) : ( balances.map((balance, idx) => (
+ No balances to display!
-
-
-
-
-
-
-
-