Skip to content

Commit

Permalink
add tokens length check
Browse files Browse the repository at this point in the history
  • Loading branch information
pvicensSpacedev committed Apr 26, 2024
1 parent 29e077d commit 51ff36e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -361,6 +363,10 @@ export function NftSelectorPickerGrid({
);
}

if (isRefreshing && !rows.length) {
return <NftSelectorLoadingSkeleton />;
}

if (!rows.length) {
return (
<View className="flex flex-col flex-1 pt-16" style={style}>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/NftSelector/NftSelectorView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function NftSelectorView({
[columnCount, onSelectContract, onSelectToken, rows, selectedContractAddress]
);

if (isLocked) {
if (isLocked && !rows.length) {
return <NftSelectorLoadingView />;
}

Expand Down

0 comments on commit 51ff36e

Please sign in to comment.