Skip to content

Commit

Permalink
Merge pull request #333 from AElfProject/feature/refactor-2.0.0-Block…
Browse files Browse the repository at this point in the history
…chain

feat: build error
  • Loading branch information
Peterbjx committed May 7, 2024
2 parents 0d419a9 + 6dd2d35 commit 4db4cd7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/app/[chain]/nft/[collectionSymbol]/_Detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { notFound } from 'next/navigation';
// import request from '@_api';
import { PAGE_SIZE } from './type';
import CollectionDetails from './CollectionDetails';
import { fetchOverviewData, fetchTransferList } from './mock';
import { fetchTransferList } from './mock';
import { ChainId, CollectionSymbol } from 'global';
import { fetchServerCollectionDetail } from '@_api/fetchNFTS';
import { TChainID } from '@_api/type';
Expand Down
39 changes: 20 additions & 19 deletions src/app/[chain]/nft/[collectionSymbol]/_Detail/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,25 @@ async function fetchHolderData(p: HolderQueryParams): Promise<CollectionHoldersD
};
}

const overview: CollectionDetailData = {
nftCollection: {
name: 'My NFT Collection',
imageUrl: 'https://etherscan.io/token/images/boredapeyc_32.png',
symbol: 'NFT',
},
items: 1000,
holders: 500,
totalTransfers: '10000',
floorPriceInUsd: 10.5,
floorAmount: 1,
contractAddress: '0x1234567890abcdef',
};
// const overview: CollectionDetailData = {
// nftCollection: {
// name: 'My NFT Collection',
// imageUrl: 'https://etherscan.io/token/images/boredapeyc_32.png',
// symbol: 'NFT',
// decimals: 0,
// },
// items: 1000,
// holders: 500,
// totalTransfers: '10000',
// floorPriceInUsd: 10.5,
// floorAmount: 1,
// contractAddress: '0x1234567890abcdef',
// };

const fetchOverviewData = async (): Promise<CollectionDetailData> => {
await new Promise((resolve) => setTimeout(resolve, 1000));
return overview;
};
// const fetchOverviewData = async (): Promise<CollectionDetailData> => {
// await new Promise((resolve) => setTimeout(resolve, 1000));
// return overview;
// };

const inventoryItemList: InventoryItem[] = Array.from(new Array(100).keys()).map((item, i) => {
const mockCollectionItem: InventorySymbol = {
Expand Down Expand Up @@ -138,11 +139,11 @@ async function fetchInventoryList(p: InventoryListParams): Promise<CollectionInv
}
export {
transferList,
overview,
// overview,
holderList,
inventoryItemList,
fetchTransferList,
fetchHolderData,
fetchOverviewData,
// fetchOverviewData,
fetchInventoryList,
};

0 comments on commit 4db4cd7

Please sign in to comment.