@frontegg/react-hooks 5.57.3 → 5.58.1
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/index.js +3 -3
- package/node/index.js +3 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -62,10 +62,10 @@ const HideChildrenIfFronteggRoutes = ({ children, basename }) => {
|
|
|
62
62
|
return React.createElement(React.Fragment, null, children);
|
|
63
63
|
};
|
|
64
64
|
const FronteggContent = ({ children, app, setLoading }) => {
|
|
65
|
-
var _a, _b;
|
|
65
|
+
var _a, _b, _c;
|
|
66
66
|
const { isLoading } = useAuth(({ isLoading }) => ({ isLoading }));
|
|
67
67
|
const customLoginBox = !app || ((_a = app === null || app === void 0 ? void 0 : app.options) === null || _a === void 0 ? void 0 : _a.customLoginBox) === true;
|
|
68
|
-
const
|
|
68
|
+
const alwaysShowChildren = customLoginBox || (((_b = app === null || app === void 0 ? void 0 : app.options) === null || _b === void 0 ? void 0 : _b.hostedLoginBox) === true && ((_c = app === null || app === void 0 ? void 0 : app.options) === null || _c === void 0 ? void 0 : _c.framework) === 'nextjs');
|
|
69
69
|
const loadingRef = useRef(undefined);
|
|
70
70
|
if (isLoading !== loadingRef.current) {
|
|
71
71
|
loadingRef.current = isLoading;
|
|
@@ -74,7 +74,7 @@ const FronteggContent = ({ children, app, setLoading }) => {
|
|
|
74
74
|
if (isLoading) {
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
|
-
if (
|
|
77
|
+
if (alwaysShowChildren) {
|
|
78
78
|
return React.createElement(React.Fragment, null, children);
|
|
79
79
|
}
|
|
80
80
|
return React.createElement(HideChildrenIfFronteggRoutes, { basename: app === null || app === void 0 ? void 0 : app.options.basename }, children);
|
package/node/index.js
CHANGED
|
@@ -67,10 +67,10 @@ const HideChildrenIfFronteggRoutes = ({ children, basename }) => {
|
|
|
67
67
|
return React__default['default'].createElement(React__default['default'].Fragment, null, children);
|
|
68
68
|
};
|
|
69
69
|
const FronteggContent = ({ children, app, setLoading }) => {
|
|
70
|
-
var _a, _b;
|
|
70
|
+
var _a, _b, _c;
|
|
71
71
|
const { isLoading } = roles.useAuth(({ isLoading }) => ({ isLoading }));
|
|
72
72
|
const customLoginBox = !app || ((_a = app === null || app === void 0 ? void 0 : app.options) === null || _a === void 0 ? void 0 : _a.customLoginBox) === true;
|
|
73
|
-
const
|
|
73
|
+
const alwaysShowChildren = customLoginBox || (((_b = app === null || app === void 0 ? void 0 : app.options) === null || _b === void 0 ? void 0 : _b.hostedLoginBox) === true && ((_c = app === null || app === void 0 ? void 0 : app.options) === null || _c === void 0 ? void 0 : _c.framework) === 'nextjs');
|
|
74
74
|
const loadingRef = React.useRef(undefined);
|
|
75
75
|
if (isLoading !== loadingRef.current) {
|
|
76
76
|
loadingRef.current = isLoading;
|
|
@@ -79,7 +79,7 @@ const FronteggContent = ({ children, app, setLoading }) => {
|
|
|
79
79
|
if (isLoading) {
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
82
|
+
if (alwaysShowChildren) {
|
|
83
83
|
return React__default['default'].createElement(React__default['default'].Fragment, null, children);
|
|
84
84
|
}
|
|
85
85
|
return React__default['default'].createElement(HideChildrenIfFronteggRoutes, { basename: app === null || app === void 0 ? void 0 : app.options.basename }, children);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
3
|
"libName": "FronteggReactHooks",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.58.1",
|
|
5
5
|
"author": "Frontegg LTD",
|
|
6
6
|
"main": "./node/index.js",
|
|
7
7
|
"module": "./index.js",
|
|
8
8
|
"types": "./index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@frontegg/redux-store": "5.
|
|
10
|
+
"@frontegg/redux-store": "5.58.1",
|
|
11
11
|
"react-redux": "^7.x"
|
|
12
12
|
}
|
|
13
13
|
}
|