vocdoni / ui-components

Vocdoni UI components libs
GNU General Public License v3.0
3 stars 2 forks source link

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

Open elboletaire opened 3 months ago

elboletaire commented 3 months ago

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.