Cloning OpenSea NFT Boilerplate Questions

And hereā€¦?

I guess it gives the same error here as well. You can give it a try.

The function to sell and to calculate price is in NFTBalance.jsx page.

ok, like this?

price: item.price / (listPrice)
or
price: item.price / (ā€œlistPriceā€)

Ok itā€™s done for the price on the netā€¦

Is it working or still the same error?
What did the console log return

I didnā€™t make any logs I just made this

price: item.price / (price)

add a console log for this calculated p, so we can know why the error is still happening on net.

Sorry I had a little power outageā€¦actually you were rightā€¦there was no more error because I retried the old build file with only the changes you told me and I donā€™t have the errorā€¦it shouldnā€™t be updatedā€¦

I just found the forced update on Ionosā€¦ the button was hidden

1 Like

I just saw this, and my next lottery contains 200 tickets.

For the moment they are not yet minted but the contract is already created, should I apply now, which application should I use getAllTokenIds or /nft/{address} ?

Hello, I have a total of 200 NFTs. Using useMoralisWeb3ApiCall is get 100 for that particular collection then I use the cursor to fetch the next 100 NFTs. I want to ask how do I implement pagination. When I last 100 NFts are fetched they are populated and then there is no way for me to go back to see the NFTs that were fetched in first call.

getAllTokenIds or /nft/{address}

These are the same API endpoint, getAllTokenIds is the name of it and the latter is the URL path. If theyā€™re not minted, then you wonā€™t be able to get any data for them from the API.

1 Like

To get the previous results you will have to store this data somewhere e.g. in state like useState e.g. const [nfts, setNfts] = useState([]).

For pagination, an example of what you could do is have a button at the bottom of the page that when clicked loads the next 100 results, and then add these results to your existing nfts state. And then this state is used to render/display the NFT data instead of the useMoralisWeb3ApiCall()'s data.

Thank you ser, I contacted my hosting provider for the routerā€¦ they donā€™t have any info about itā€¦ but I saw that there are several ways to deploy a react appā€¦

what is recommended for this market placeā€¦ for example I use yarn build, but I see that there are others like serve -s build (which doesnā€™t work for me)

For hosting your React app you can use Netlify or Vercel.

Easiest way to get it up and running to test is using Netlify Drop where you just drag and drop your build folder (from yarn build).

1 Like

Humm same error on netlifyā€¦

Capture dā€™Ć©cran 2022-06-12 002803

You will have to do another step on getting react-router to work.

Create a new file with the name _redirects inside the public folder of our project and add the following contents inside it:

/* /index.html 200

Then re-build and reupload this folder (from the Netlify site > Deploy tab > "Need to update your site?).

1 Like

It seems to workā€¦ thanks

But how will I trigger web3api call if the state of the token is changed on the blockchain? for example: I fetch the 200 NFTs in two API calls and store them in state and then display them from the state but letā€™s say an NFTs is sold. will it call the web3 API in this case or will i have to manually check for that?