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

Election related actions should be using the client instance from useElection, instead of the one by useClient. #171

Open
elboletaire opened this issue May 24, 2024 · 0 comments
Labels
bug Something isn't working react-providers

Comments

@elboletaire
Copy link
Member

Given the scope of the different clients (which can be the same in many scenarios), and after trying to manually set a custom client in a custom implementation, we realize some internal calls related to elections (like fetching the census, for example), are using the client instance from the parent ClientProvider, instead of using the one from the ElectionProvider. This causes confusion, since using the setClient from useElection will not work in many cases.

All election related actions should prioritize the client set in useElection rather than the one from useClient.

@elboletaire elboletaire added bug Something isn't working react-providers labels May 24, 2024
elboletaire added a commit that referenced this issue Jun 13, 2024
- Ensure the `connected` field is properly checked via
  Object.keys().length
- Remove SpreadsheetAccess component logic from VoteButton (import it on
  your own if you need it, this is the most breaking change)
- Use election context instead of clients one (refs #171)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react-providers
Projects
None yet
Development

No branches or pull requests

1 participant