Compare commits

..

3 Commits

4 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,5 @@
# [0.1.0-develop.23](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.22...v0.1.0-develop.23) (2023-10-12)
# [0.1.0-develop.22](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.21...v0.1.0-develop.22) (2023-10-12)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/sdk",
"version": "0.1.0-develop.22",
"version": "0.1.0-develop.23",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/sdk",
"version": "0.1.0-develop.22",
"version": "0.1.0-develop.23",
"dependencies": {
"@lumeweb/kernel-network-registry-client": "0.1.0-develop.10",
"@lumeweb/libkernel": "0.1.0-develop.65",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/sdk",
"version": "0.1.0-develop.22",
"version": "0.1.0-develop.23",
"type": "module",
"main": "lib/index.js",
"types": "lib/src/index.d.ts",

View File

@ -35,6 +35,7 @@ type LumeContextType = {
setIsLoggedIn: (value: boolean) => void;
lume: LumeObject;
ready: boolean;
setReady: React.Dispatch<React.SetStateAction<boolean>>;
};
const networkRegistry = createNetworkRegistryClient();
@ -122,8 +123,6 @@ const LumeProvider = ({ children }) => {
useEffect(() => {
fetchAndUpdateNetworks();
loginComplete().then(() => isMounted.current && setIsLoggedIn(true));
init().then(() => isMounted.current && setReady(true));
const subDone = networkRegistry.subscribeToUpdates(() =>
fetchAndUpdateNetworks(),
@ -137,7 +136,8 @@ const LumeProvider = ({ children }) => {
}, [fetchAndUpdateNetworks]);
return (
<LumeContext.Provider value={{ lume, ready, isLoggedIn, setIsLoggedIn }}>
<LumeContext.Provider
value={{ lume, ready, setReady, isLoggedIn, setIsLoggedIn }}>
{children}
</LumeContext.Provider>
);