Migrating from Redux to RTK-query

This commit is contained in:
2023-10-20 11:54:07 -04:00
parent 206c2eeb4b
commit 4ea9086e3f
15 changed files with 204 additions and 201 deletions

View File

@@ -0,0 +1,19 @@
import { emptySplitApi } from "./empty.api";
import { useConnectToQBittorrentClientQuery } from "./torrents.api";
export const settingsApi = emptySplitApi.injectEndpoints({
endpoints: (builder) => ({
getAllSettings: builder.query({
query: () => "localhost:3000/api/settings/getAllSettings",
}),
getQBitTorrentClientInfo: builder.query({
queryFn: async () => {
try {
} catch (err) {}
},
}),
}),
overrideExisting: false,
});
export const { useGetAllSettingsQuery } = settingsApi;