authscape 1.0.28 → 1.0.29
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/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
2
|
import apiService from './apiService';
|
|
3
3
|
|
|
4
|
-
export default function AuthorizationComponent({children, setCurrentUser, userLoaded}) {
|
|
4
|
+
export default function AuthorizationComponent({children, setCurrentUser, userLoaded, isLoading}) {
|
|
5
5
|
|
|
6
6
|
const [loaded, setLoaded] = useState(false);
|
|
7
|
-
|
|
8
|
-
|
|
9
7
|
const validateUserSignedIn = async () => {
|
|
10
8
|
|
|
11
9
|
setLoaded(true);
|
|
@@ -32,5 +30,12 @@ export default function AuthorizationComponent({children, setCurrentUser, userLo
|
|
|
32
30
|
|
|
33
31
|
}, [loaded]);
|
|
34
32
|
|
|
35
|
-
return (
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
{children}
|
|
36
|
+
<Backdrop sx={{ color: '#fff', zIndex: 99999 }} open={isLoading}>
|
|
37
|
+
<CircularProgress color="inherit" />
|
|
38
|
+
</Backdrop>
|
|
39
|
+
</>
|
|
40
|
+
)
|
|
36
41
|
}
|