bkrem / react-nft-gallery Goto Github PK
View Code? Open in Web Editor NEW:framed_picture: React component to display your NFTs as a gallery
Home Page: https://bkrem.github.io/react-nft-gallery
License: MIT License
:framed_picture: React component to display your NFTs as a gallery
Home Page: https://bkrem.github.io/react-nft-gallery
License: MIT License
The issue with making the API calls on the client side is that when an API key is used it'll be visible in the Network tabs and so anyone could steal it.
In an ideal world, the API calls would be made on the server side and we could pass the assets to your component which would render them.
So would be awesome if you could add this feature!!
I want to be able to hide the load more button and display all the nfts at once.
Is that possible?
The URL you're using gives a 401 error.
Currently you're using:
https://api.opensea.io/api/v1/assets?limit=50&offset=${offset}${ owner ? '&owner=' + owner : '' }
If you remove the limit and offset parameters and you just leave the owner parameter it works fine.
Version 0.7.0
Consider the following:
<NftGallery darkMode hasExternalLinks={false} showcaseMode
showcaseItemIds={[
'0x148d1280a62ef720124537cdf53a084d499607e4/6',
'0x148d1280a62ef720124537cdf53a084d499607e4/7',
]}
ownerAddress="knitkins.eth"/>
What I expected to happen was for an XHR to OpenSea to gather the first 20 items from the ownerAddress
and then filter those results for the defined showcaseItemIds
and display two images.
What actually happens is the component makes 20 XHR requests to OpenSea and each time renders the two items twice. The result is a total of 40 images (20x2) displayed. If I add another showcaseItemIds
to have say three total, then 40 requests to OpenSea are made and 90 images (30x3) are displayed.
Using the component in non-showcase mode behaves correctly and displays the most recent 20 results from OS (not using an API key currently).
I can provide additional details if necessary.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.