codebuddies / frontend

Frontend concept with React for CBv3
https://cbv3.netlify.app
GNU General Public License v3.0
20 stars 27 forks source link

[Issue 143] Refactor /resources page to use React Query #147

Closed lpatmo closed 4 years ago

lpatmo commented 4 years ago

What type of PR is this? (check all applicable)

Context

Paired with @peoray to refactor the /resources page to use React Query (https://react-query.tanstack.com/docs/guides/queries#query-keys)

Screenshots/Recordings (if there are UI changes)

No UI changes! image

Implementation Details - what was your thought process as you changed the code?

[x] Added a getResources function to utils/queries.js [x] Removed the useEffect and axios on the Resources component [x] Used the useQuery hook on the Resources component

Related Tickets & Documents (Optional)

Closes issue #143.

Added tests?

Will add tests sooon :D

Added to documentation (readme.md or contributing.md)?

lpatmo commented 4 years ago

Closing this PR in favor of https://github.com/codebuddies/frontend/pull/162.