Giter Site home page Giter Site logo

bkrem / react-nft-gallery Goto Github PK

View Code? Open in Web Editor NEW
75.0 75.0 33.0 3.9 MB

:framed_picture: React component to display your NFTs as a gallery

Home Page: https://bkrem.github.io/react-nft-gallery

License: MIT License

JavaScript 3.10% TypeScript 79.86% CSS 16.91% Shell 0.14%
ethereum gallery nft react react-component reactjs typescript web3

react-nft-gallery's People

Contributors

bkrem avatar trkaplan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-nft-gallery's Issues

Hide the load more button

I want to be able to hide the load more button and display all the nfts at once.
Is that possible?

Showcase mode does not behave correctly

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.

Screenshot from 2022-04-11 14-38-00

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.

OpenSea Fetch Assets URL gives an error

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.

Passing assets directly as an input of the component

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.

Screenshot 2022-02-13 at 14 14 39

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!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.