This repository has been archived by the owner on May 15, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(redux): add API queries for 'Summary' using Redux toolkit Query
## what - Add Redux Toolkit queries for 'Summary' - GET summary - Fetch Pi-hole Summary from API - The data is formatted for readability - GET summary raw - Fetch Pi-hole Summary raw from API - The data is in raw format - export prebuilt React hooks for 'Summary' queries - useGetSummaryQuery - React hook for fetching Pi-hole Summary - useGetSummaryRawQuery - React hook for fetching Pi-hole Summary in raw format ## how - used guide from - https://redux-toolkit.js.org/rtk-query/overview - https://redux-toolkit.js.org/rtk-query/usage/queries - https://redux-toolkit.js.org/rtk-query/usage/code-splitting ## why - Easy way to manage fetching data from API, etc - Less overhead to manage the code to handle these operations - most of the work is done for you ## where - ./src/utils/url/api.ts ## usage
- Loading branch information