nectiasw 0.0.85 → 0.0.87
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/index.es.js +16 -20
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/providers/microfront/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -52685,7 +52685,6 @@ const MicrofrontHost = React__default.memo((props) => {
|
|
|
52685
52685
|
includeNavbarDropdown
|
|
52686
52686
|
} = props;
|
|
52687
52687
|
const dismiss = React__default.useRef(true);
|
|
52688
|
-
const authentication = React__default.useRef(props == null ? void 0 : props.onAuthCallback);
|
|
52689
52688
|
const [signal, setSignal] = React__default.useState({});
|
|
52690
52689
|
const handleAuthCallback = React__default.useCallback(async () => {
|
|
52691
52690
|
var _a3;
|
|
@@ -52694,24 +52693,21 @@ const MicrofrontHost = React__default.memo((props) => {
|
|
|
52694
52693
|
loading: true
|
|
52695
52694
|
}));
|
|
52696
52695
|
try {
|
|
52697
|
-
const data = await ((_a3 =
|
|
52698
|
-
setSignal((signal2) => {
|
|
52699
|
-
|
|
52700
|
-
|
|
52701
|
-
|
|
52702
|
-
|
|
52703
|
-
|
|
52704
|
-
|
|
52705
|
-
|
|
52706
|
-
|
|
52707
|
-
|
|
52708
|
-
|
|
52709
|
-
|
|
52710
|
-
|
|
52711
|
-
|
|
52712
|
-
}
|
|
52713
|
-
};
|
|
52714
|
-
});
|
|
52696
|
+
const data = await ((_a3 = props == null ? void 0 : props.onAuthCallback) == null ? void 0 : _a3.call(props));
|
|
52697
|
+
setSignal((signal2) => ({
|
|
52698
|
+
...signal2,
|
|
52699
|
+
user: data,
|
|
52700
|
+
ref: {
|
|
52701
|
+
lastName: renderName(data == null ? void 0 : data.lastName),
|
|
52702
|
+
firstName: renderName(data == null ? void 0 : data.firstName),
|
|
52703
|
+
role: assign(data == null ? void 0 : data.roles)
|
|
52704
|
+
},
|
|
52705
|
+
session: {
|
|
52706
|
+
token: data == null ? void 0 : data.token,
|
|
52707
|
+
refreshToken: data == null ? void 0 : data.refreshToken
|
|
52708
|
+
},
|
|
52709
|
+
info: (data == null ? void 0 : data.token) ? jwtDecode(data.token) : void 0
|
|
52710
|
+
}));
|
|
52715
52711
|
} catch (e) {
|
|
52716
52712
|
console.debug("Microfront Error:", e);
|
|
52717
52713
|
} finally {
|
|
@@ -52720,7 +52716,7 @@ const MicrofrontHost = React__default.memo((props) => {
|
|
|
52720
52716
|
loading: false
|
|
52721
52717
|
}));
|
|
52722
52718
|
}
|
|
52723
|
-
}, []);
|
|
52719
|
+
}, [props == null ? void 0 : props.onAuthCallback]);
|
|
52724
52720
|
React__default.useEffect(() => {
|
|
52725
52721
|
handleAuthCallback();
|
|
52726
52722
|
}, [handleAuthCallback]);
|