Skip to content

Commit

Permalink
fiX: mobile: NFT, nothing is shown when a wallet is empty #1214
Browse files Browse the repository at this point in the history
- Added ListEmptyComponent with No NFTs found message using BrandText component.
  • Loading branch information
omniwired committed Apr 18, 2024
1 parent b8d0915 commit f23c8e3
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions packages/screens/Mini/Wallet/NFTScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import {
Sort,
SortDirection,
} from "@/api/marketplace/v1/marketplace";
import { BrandText } from "@/components/BrandText";
import { SpacerColumn } from "@/components/spacer";
import { useCollections } from "@/hooks/useCollections";
import { useNFTs } from "@/hooks/useNFTs";

Check failure on line 17 in packages/screens/Mini/Wallet/NFTScreen.tsx

View workflow job for this annotation

GitHub Actions / lint-and-build

'useNFTs' is defined but never used
import { useSelectedNativeWallet } from "@/hooks/wallet/useSelectedNativeWallet";
import { parseNetworkObjectId } from "@/networks";
import { ScreenFC } from "@/utils/navigation";
import { neutralA3 } from "@/utils/style/colors";
import { fontSemibold14 } from "@/utils/style/fonts";
import { fontSemibold14, fontSemibold16 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

const NFTScreen: ScreenFC<"MiniWallets"> = ({ navigation }) => {
Expand Down Expand Up @@ -59,11 +61,22 @@ const NFTScreen: ScreenFC<"MiniWallets"> = ({ navigation }) => {
.toLowerCase()
.includes(filterText.toLowerCase()),
)}
ListEmptyComponent={
<BrandText
style={[
fontSemibold16,
{
textAlign: "center",
marginTop: layout.spacing_x1_25,
},
]}
>
No NFTs found
</BrandText>
}
keyExtractor={(item) => item.id}
renderItem={({ item, index }) => (
<>
<NFTAccordion index={index} ownerId={userId} collection={item} />
</>
<NFTAccordion index={index} ownerId={userId} collection={item} />
)}
/>
</View>
Expand Down

0 comments on commit f23c8e3

Please sign in to comment.