curaOS / source

Start a solid foundation of tools for creators+builders.
https://cura.run
15 stars 13 forks source link

Project Gallery with paging #88

Closed bestatigen closed 2 years ago

bestatigen commented 2 years ago

At the moment, if you sign in with NEAR, the explore page looks like this:

cura run_cc_aprts_explore

Next is to:

  1. Turn this page into a gallery of the project's designs (that you can retrieve at the NFT method nft_tokens). It's similar to what's happening with the View page (nfts_tokens_for_owner in the smart contract) where you see all the designs you own; Explore page should instead show all the tokens saved in that NFT contract.
  2. Move the current Explore page under a new route explore/[id]; see /view/[id].js as example.

Since you will go out of gas if you try to retrieve more than 3-4 tokens at a time (need to see if it's possible to increase that number #57), this should be a paged retrieval, preferably on scroll (other strategies are welcome).

bestatigen commented 2 years ago

@Jovisx

bestatigen commented 2 years ago

Max gas that can be passed to the contract:

const CONTRACT_VIEW_GAS = utils.format.parseNearAmount('0.00000000030') // 300 Tgas