authscape 1.0.202 → 1.0.206

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 CHANGED
@@ -35,7 +35,7 @@ function AuthScapeApp(_ref) {
35
35
  enforceLoggedIn = _ref$enforceLoggedIn === void 0 ? false : _ref$enforceLoggedIn,
36
36
  _ref$onAuthentication = _ref.onAuthenticationLoaded,
37
37
  onAuthenticationLoaded = _ref$onAuthentication === void 0 ? null : _ref$onAuthentication;
38
- var _useState = (0, _react.useState)(false),
38
+ var _useState = (0, _react.useState)(process.env.enableOEMClient ? true : false),
39
39
  _useState2 = _slicedToArray(_useState, 2),
40
40
  isLoading = _useState2[0],
41
41
  setIsLoading = _useState2[1];
@@ -69,6 +69,7 @@ function AuthScapeApp(_ref) {
69
69
 
70
70
  // ORM module
71
71
  if (process.env.enableOEMClient) {
72
+ setIsLoading(true);
72
73
  var fetchRecordData = /*#__PURE__*/function () {
73
74
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
74
75
  var baseURL, response;
@@ -82,6 +83,7 @@ function AuthScapeApp(_ref) {
82
83
  response = _context.sent;
83
84
  if (response != null && response.status == 200) {
84
85
  setDomainData(response.data);
86
+ setIsLoading(false);
85
87
  }
86
88
  case 5:
87
89
  case "end":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.202",
3
+ "version": "1.0.206",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ import Head from "next/head";
9
9
 
10
10
  export function AuthScapeApp({Component, pageProps, muiTheme = {}, enforceLoggedIn = false, onAuthenticationLoaded = null}) {
11
11
 
12
- const [isLoading, setIsLoading] = useState(false);
12
+ const [isLoading, setIsLoading] = useState(process.env.enableOEMClient ? true : false);
13
13
  const [loadedUser, setLoadedUser] = useState(false);
14
14
  const [currentUser, setCurrentUser] = useState(null);
15
15
  const [loadingLogin, setLoadingLogin] = useState(false);
@@ -33,12 +33,15 @@ export function AuthScapeApp({Component, pageProps, muiTheme = {}, enforceLogged
33
33
  // ORM module
34
34
  if (process.env.enableOEMClient)
35
35
  {
36
+ setIsLoading(true);
37
+
36
38
  const fetchRecordData = async () => {
37
39
  var baseURL = window.location.protocol + "//" + window.location.host;
38
40
  let response = await apiService().get("/oem/GetDataFromRecord?domain=" + baseURL);
39
41
  if (response != null && response.status == 200)
40
42
  {
41
43
  setDomainData(response.data);
44
+ setIsLoading(false);
42
45
  }
43
46
  }
44
47
  fetchRecordData();