react-toolkits 2.13.12 → 2.13.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/index.js +3 -7
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -557,18 +557,14 @@ var init_hooks2 = __esm({
|
|
|
557
557
|
var useGames, useFindGame;
|
|
558
558
|
var init_hooks3 = __esm({
|
|
559
559
|
"src/components/layout/hooks.ts"() {
|
|
560
|
-
init_constants();
|
|
561
560
|
init_toolkitsProvider();
|
|
562
561
|
useGames = () => {
|
|
563
|
-
const { axios: axios2, gameApiV2
|
|
562
|
+
const { axios: axios2, gameApiV2 } = useToolkitsStore((s) => s);
|
|
564
563
|
return useSWR5("/api/game/list", async () => {
|
|
565
|
-
const headers = new AxiosHeaders({ [APP_ID_HEADER]: "global", Authorization: `Bearer ${token}` });
|
|
566
564
|
const games = gameApiV2 ? await axios2({
|
|
567
|
-
url: "/api/game/list"
|
|
568
|
-
headers
|
|
565
|
+
url: "/api/game/list"
|
|
569
566
|
}).then((response) => response.data.data.list ?? []) : await axios2({
|
|
570
|
-
url: "/api/usystem/game/all"
|
|
571
|
-
headers
|
|
567
|
+
url: "/api/usystem/game/all"
|
|
572
568
|
}).then((response) => response.data.data ?? []);
|
|
573
569
|
return games;
|
|
574
570
|
});
|