Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fiX: mobile: NFT, nothing is shown when a wallet is empty #1214 #1215

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
.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
Loading