@openstack_dev/gatsby-theme-marketing-oif-core 1.0.34-beta.4 → 1.0.35-beta.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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect } from "react";
|
|
2
2
|
import { useSelector } from "react-redux";
|
|
3
3
|
import { doLoginBasicLogin } from "openstack-uicore-foundation/lib/security/methods";
|
|
4
4
|
import { getBackURL } from "../utils/url";
|
|
@@ -45,6 +45,5 @@ export default function AuthBootstrap() {
|
|
|
45
45
|
if (!isLoggedUser) checkLoginStatus();
|
|
46
46
|
}, [isLoggedUser]);
|
|
47
47
|
|
|
48
|
-
|
|
49
48
|
return null;
|
|
50
49
|
}
|
|
@@ -15,9 +15,10 @@ export function ReduxWrapper({ element }) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export function ReduxWrapperWithCacheProvider({ element }) {
|
|
18
|
-
const
|
|
18
|
+
const cacheRef = React.useRef(null);
|
|
19
|
+
if (!cacheRef.current) cacheRef.current = createEmotionCache();
|
|
19
20
|
return (
|
|
20
|
-
<CacheProvider value={
|
|
21
|
+
<CacheProvider value={cacheRef.current}>
|
|
21
22
|
<Provider store={store}>
|
|
22
23
|
<AuthBootstrap />
|
|
23
24
|
<PersistGate persistor={persistor}>{() => element}</PersistGate>
|