react-toolkits 2.13.12 → 2.13.14

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.13.14
4
+
5
+ ### Patch Changes
6
+
7
+ - 4149042: beta
8
+
9
+ ## 2.13.13
10
+
11
+ ### Patch Changes
12
+
13
+ - d0a9815: chore: remove useless headers
14
+
3
15
  ## 2.13.12
4
16
 
5
17
  ### Patch Changes
package/lib/index.js CHANGED
@@ -518,10 +518,10 @@ var init_highlight = __esm({
518
518
  }
519
519
  });
520
520
  function useMenuList() {
521
- const { signInPath, axios: axios2 } = useToolkitsStore((s) => s);
521
+ const { signInPath, axios: axios2, gameId } = useToolkitsStore((s) => s);
522
522
  return useSWR5(
523
- window.location.pathname !== signInPath ? "/api/usystem/menu/navbar" : null,
524
- (url4) => axios2(url4).then((response) => response.data.data)
523
+ window.location.pathname !== signInPath ? ["/api/usystem/menu/navbar", gameId] : null,
524
+ ([url4]) => axios2(url4).then((response) => response.data.data)
525
525
  );
526
526
  }
527
527
  var usePermissions, usePermission;
@@ -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, token } = useToolkitsStore((s) => s);
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
  });
@@ -2242,13 +2238,13 @@ var init_permissionCollapse = __esm({
2242
2238
  onChange: (e) => {
2243
2239
  onCheckChange(
2244
2240
  e,
2245
- item.permissions.map((permission) => permission.value)
2241
+ item.permissions?.map((permission) => permission.value)
2246
2242
  );
2247
2243
  },
2248
2244
  children: t("global.selectAll")
2249
2245
  }
2250
2246
  ),
2251
- children: /* @__PURE__ */ jsx(Checkbox.Group, { style: { width: "100%" }, value: internalValue, disabled: readonly, children: /* @__PURE__ */ jsx(Row, { gutter: [10, 10], style: { width: "100%" }, children: item.permissions.map((permission) => /* @__PURE__ */ jsx(Col, { span: 6, children: /* @__PURE__ */ jsx(
2247
+ children: /* @__PURE__ */ jsx(Checkbox.Group, { style: { width: "100%" }, value: internalValue, disabled: readonly, children: /* @__PURE__ */ jsx(Row, { gutter: [10, 10], style: { width: "100%" }, children: item.permissions?.map((permission) => /* @__PURE__ */ jsx(Col, { span: 6, children: /* @__PURE__ */ jsx(
2252
2248
  Checkbox,
2253
2249
  {
2254
2250
  value: permission.value,