From 51ff36ebcbdc47c050e0f44d2fe8e8a0e1b0d901 Mon Sep 17 00:00:00 2001 From: Patricio Vicens Date: Fri, 26 Apr 2024 15:09:11 -0300 Subject: [PATCH] add tokens length check --- .../src/screens/NftSelectorScreen/NftSelectorPickerGrid.tsx | 6 ++++++ apps/web/src/components/NftSelector/NftSelectorView.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/screens/NftSelectorScreen/NftSelectorPickerGrid.tsx b/apps/mobile/src/screens/NftSelectorScreen/NftSelectorPickerGrid.tsx index d55dc10e6..9425f8b92 100644 --- a/apps/mobile/src/screens/NftSelectorScreen/NftSelectorPickerGrid.tsx +++ b/apps/mobile/src/screens/NftSelectorScreen/NftSelectorPickerGrid.tsx @@ -38,6 +38,8 @@ import { contexts } from '~/shared/analytics/constants'; import { removeNullValues } from '~/shared/relay/removeNullValues'; import { doesUserOwnWalletFromChainFamily } from '~/shared/utils/doesUserOwnWalletFromChainFamily'; +import { NftSelectorLoadingSkeleton } from './NftSelectorLoadingSkeleton'; + type NftSelectorPickerGridProps = { style?: ViewProps['style']; searchCriteria: { @@ -361,6 +363,10 @@ export function NftSelectorPickerGrid({ ); } + if (isRefreshing && !rows.length) { + return ; + } + if (!rows.length) { return ( diff --git a/apps/web/src/components/NftSelector/NftSelectorView.tsx b/apps/web/src/components/NftSelector/NftSelectorView.tsx index 9ea9419c6..34e837983 100644 --- a/apps/web/src/components/NftSelector/NftSelectorView.tsx +++ b/apps/web/src/components/NftSelector/NftSelectorView.tsx @@ -225,7 +225,7 @@ export function NftSelectorView({ [columnCount, onSelectContract, onSelectToken, rows, selectedContractAddress] ); - if (isLocked) { + if (isLocked && !rows.length) { return ; }