Skip to content

Commit

Permalink
nft pagination fix (#1246)
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev authored Oct 2, 2023
1 parent f680408 commit 57b176d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/pages/Token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,17 @@ const TokenPageContent = () => {

let pagination: PaginationParams | undefined;

if (!tab || tab === 'token_transfers') {
// default tab for erc-20 is token transfers
if ((tokenQuery.data?.type === 'ERC-20' && !tab) || tab === 'token_transfers') {
pagination = transfersQuery.pagination;
}

if (router.query.tab === 'holders') {
pagination = holdersQuery.pagination;
}

if (tab === 'inventory') {
// default tab for nfts is token inventory
if (((tokenQuery.data?.type === 'ERC-1155' || tokenQuery.data?.type === 'ERC-721') && !tab) || tab === 'inventory') {
pagination = inventoryQuery.pagination;
}

Expand Down

0 comments on commit 57b176d

Please sign in to comment.