Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to hide an exchange #50

Open
LucBerge opened this issue Jul 31, 2022 · 1 comment
Open

Possibility to hide an exchange #50

LucBerge opened this issue Jul 31, 2022 · 1 comment

Comments

@LucBerge
Copy link

LucBerge commented Jul 31, 2022

In my web interface, I've saved multiple portfolios. I would like to be able to hide the ones I want.

At the bottom of the interface, in the "exchanges" section, we can add a "hide/show" button next to the "edit" button.

@LucBerge
Copy link
Author

LucBerge commented Jul 31, 2022

In the store, add a hide boolean (default : false)

{
  [exchangeId]: {
    loading: boolean
    error: object|string
    lastUpdated: number
    data: {
      [symbol]: number - amount of target symbol in account
    }
  }
}

In the portfolio.js file, in the fetchAllPortfolioData constant, filter the exchanges which have the hide value to false.

In the ExchangesListContainer/index.js file, line 113, add:

<td className="u-textCenter">
  <Button
    isOutlined
    isSize="small"
    isColor="black"
    onClick={() => togglePortfolioData(id)}
    >
  hide
  </Button>
</td>

The togglePortfolioData function should:

  • Change the "hide" text to "show" or change the "show" text to "hide"
  • Change the hide value in the store to the opposite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant