react-toolkits 2.13.30 → 2.13.31

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,11 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.13.31
4
+
5
+ ### Patch Changes
6
+
7
+ - e423d66: fix: app-id should be 'global' when disallowed changing game
8
+
3
9
  ## 2.13.30
4
10
 
5
11
  ### Patch Changes
package/lib/index.js CHANGED
@@ -619,20 +619,12 @@ var init_highlight = __esm({
619
619
  }
620
620
  });
621
621
  function usePermission(code, config) {
622
- const { axios: axios2, permissionVersion, gameId } = useToolkitsStore((s) => s);
622
+ const { axios: axios2, permissionVersion } = useToolkitsStore((s) => s);
623
623
  const url4 = permissionVersion !== "v1" /* V1 */ ? "/api/usystem/user/checkV2" : "/api/usystem/user/check";
624
624
  const permissionCodes = typeof code !== "undefined" ? typeof code === "string" ? [code] : code : [];
625
625
  const body = { permissions: permissionCodes };
626
- const mergedConfig = {
627
- ...config,
628
- headers: {
629
- // FIXME: 在 QueryList 内,切换游戏的时有时不会触发查询
630
- [APP_ID_HEADER]: gameId,
631
- ...config?.headers
632
- }
633
- };
634
626
  const { data, ...rest } = useSWR6(
635
- permissionCodes.length > 0 ? [url4, body, mergedConfig] : null,
627
+ permissionCodes.length > 0 ? [url4, body, config] : null,
636
628
  (args) => axios2.post(...args).then((response) => response.data.data)
637
629
  );
638
630
  let newData;