poetapp / explorer-web

Explore the Po.et Network and manage your API Tokens
https://explorer.poetnetwork.net/
MIT License
23 stars 9 forks source link

useApi Hook #541

Closed lautarodragan closed 5 years ago

lautarodragan commented 5 years ago

They are all pretty much the same. Should be able to de-duplicate a lot of code there.

Now that we have the authenticated API object in the context provider, we can use that from a useApi hook to simplify everything and handle errors automagically (most of which are being ignored right now)