Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Add a single user state for status across all components #8

Open

Description

@LibruaryNFT

I need a single state that can be updated from children or the parent in order to display certain media or dialogue text.

States

  1. App.js user.loggedIn == null
  2. App.js user.loggedIn == true && coincollectioncheck == false
  3. App.js user.loggedIn == true && coincollectioncheck == true
  4. App.js user.loggedIn ==true && balance < 1
  5. CoinStore.js purchase(); txStatus = 1, need user to approve
  6. CoinStore.js purchase(); txStatus = 4, user has new coin
  7. CoinCollection.js play(); txStatus = 1, need user to approve
  8. CoinCollection.js play(); txStatus = 4, coin has been tossed into the air
  9. CoinCollection.js item.blockEventData.id && item.blockEventData.kind == null, coin has landed into the waters
  10. CoinCollection.js item.blockEventData.coinresult != null, coin has a result

Activity

  1. LibruaryNFT commented on Mar 10, 2023

    @LibruaryNFT
    OwnerAuthor

    Abstracted Header from App.js. The states of balance and user and checkcollection are shared between both.

    Abstracted LiveResults from CoinCollection.
    Still need to be able to read the states from App.js though.

    1,2,3,4 already exist in App.js

  2. LibruaryNFT commented on Mar 10, 2023

    @LibruaryNFT
    OwnerAuthor

    5,6 for CoinStore completed.
    7,8 for CoinCollection completed.

    Added txType.
    txType for Flipping = 1
    txType for Buying = 2

  3. LibruaryNFT commented on Mar 11, 2023

    @LibruaryNFT
    OwnerAuthor

    Added navigation between waterfall, store and results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions