@fctc/interface-logic 1.9.6 → 1.9.7
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/dist/hooks.js +8 -8
- package/dist/hooks.mjs +8 -8
- package/package.json +1 -1
package/dist/hooks.js
CHANGED
|
@@ -4870,22 +4870,22 @@ var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
|
4870
4870
|
var import_react4 = require("react");
|
|
4871
4871
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
4872
4872
|
var EnvContext = (0, import_react4.createContext)(null);
|
|
4873
|
-
function useEnv() {
|
|
4874
|
-
const context = (0, import_react4.useContext)(EnvContext);
|
|
4875
|
-
if (!context) {
|
|
4876
|
-
throw new Error("useEnv must be used within an EnvProvider");
|
|
4877
|
-
}
|
|
4878
|
-
return context;
|
|
4879
|
-
}
|
|
4880
4873
|
|
|
4881
4874
|
// src/provider/env-share.tsx
|
|
4882
4875
|
var import_react5 = require("react");
|
|
4883
4876
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
4884
4877
|
var EnvShareContext = (0, import_react5.createContext)(null);
|
|
4878
|
+
function useSharedEnv() {
|
|
4879
|
+
const env2 = (0, import_react5.useContext)(EnvShareContext);
|
|
4880
|
+
if (!env2) {
|
|
4881
|
+
throw new Error("useSharedEnv must be used within an EnvShareProvider");
|
|
4882
|
+
}
|
|
4883
|
+
return env2;
|
|
4884
|
+
}
|
|
4885
4885
|
|
|
4886
4886
|
// src/services/auth-service/backup.ts
|
|
4887
4887
|
function useAuthService() {
|
|
4888
|
-
const
|
|
4888
|
+
const env2 = useSharedEnv();
|
|
4889
4889
|
const login = (0, import_react6.useCallback)(
|
|
4890
4890
|
async (body) => {
|
|
4891
4891
|
const payload = Object.fromEntries(
|
package/dist/hooks.mjs
CHANGED
|
@@ -4766,22 +4766,22 @@ import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
|
|
|
4766
4766
|
import { createContext, useContext, useState as useState3, useCallback as useCallback2 } from "react";
|
|
4767
4767
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
4768
4768
|
var EnvContext = createContext(null);
|
|
4769
|
-
function useEnv() {
|
|
4770
|
-
const context = useContext(EnvContext);
|
|
4771
|
-
if (!context) {
|
|
4772
|
-
throw new Error("useEnv must be used within an EnvProvider");
|
|
4773
|
-
}
|
|
4774
|
-
return context;
|
|
4775
|
-
}
|
|
4776
4769
|
|
|
4777
4770
|
// src/provider/env-share.tsx
|
|
4778
4771
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
4779
4772
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
4780
4773
|
var EnvShareContext = createContext2(null);
|
|
4774
|
+
function useSharedEnv() {
|
|
4775
|
+
const env2 = useContext2(EnvShareContext);
|
|
4776
|
+
if (!env2) {
|
|
4777
|
+
throw new Error("useSharedEnv must be used within an EnvShareProvider");
|
|
4778
|
+
}
|
|
4779
|
+
return env2;
|
|
4780
|
+
}
|
|
4781
4781
|
|
|
4782
4782
|
// src/services/auth-service/backup.ts
|
|
4783
4783
|
function useAuthService() {
|
|
4784
|
-
const
|
|
4784
|
+
const env2 = useSharedEnv();
|
|
4785
4785
|
const login = useCallback3(
|
|
4786
4786
|
async (body) => {
|
|
4787
4787
|
const payload = Object.fromEntries(
|