authscape 1.0.28 → 1.0.32

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,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.28",
3
+ "version": "1.0.32",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,11 +1,12 @@
1
1
  import React, { useEffect, useState, useRef } from 'react';
2
2
  import apiService from './apiService';
3
+ import Backdrop from '@mui/material/Backdrop';
4
+ import CircularProgress from '@mui/material/CircularProgress';
5
+ import { Box } from '@mui/material';
3
6
 
4
- export default function AuthorizationComponent({children, setCurrentUser, userLoaded}) {
7
+ export default function AuthorizationComponent({children, setCurrentUser, userLoaded, isLoading}) {
5
8
 
6
9
  const [loaded, setLoaded] = useState(false);
7
-
8
-
9
10
  const validateUserSignedIn = async () => {
10
11
 
11
12
  setLoaded(true);
@@ -32,5 +33,12 @@ export default function AuthorizationComponent({children, setCurrentUser, userLo
32
33
 
33
34
  }, [loaded]);
34
35
 
35
- return (children)
36
+ return (
37
+ <Box>
38
+ {children}
39
+ <Backdrop sx={{ color: '#fff', zIndex: 99999 }} open={isLoading}>
40
+ <CircularProgress color="inherit" />
41
+ </Backdrop>
42
+ </Box>
43
+ )
36
44
  }