@nexys/user-management-sdk 0.0.6 → 0.0.8
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/context.js +3 -3
- package/package.json +1 -1
package/dist/context.js
CHANGED
|
@@ -47,9 +47,6 @@ export const AuthProvider = ({ authClient, Spinner, loginPath, }) => ({ children
|
|
|
47
47
|
return navigate(loginPath, { state: navigationMessage });
|
|
48
48
|
}
|
|
49
49
|
}, []);
|
|
50
|
-
if (profile === null) {
|
|
51
|
-
return _jsx(Spinner, {});
|
|
52
|
-
}
|
|
53
50
|
// Set up refresh interval when profile exists
|
|
54
51
|
React.useEffect(() => {
|
|
55
52
|
if (!profile)
|
|
@@ -59,6 +56,9 @@ export const AuthProvider = ({ authClient, Spinner, loginPath, }) => ({ children
|
|
|
59
56
|
clearInterval(intervalId);
|
|
60
57
|
};
|
|
61
58
|
}, [profile, refreshToken]);
|
|
59
|
+
if (profile === null) {
|
|
60
|
+
return _jsx(Spinner, {});
|
|
61
|
+
}
|
|
62
62
|
const logout = () => {
|
|
63
63
|
setProfile(null);
|
|
64
64
|
authClient.authLogout();
|