dispatch LoadCtx on app run

This commit is contained in:
NikolaBorislavovHristov 2019-10-16 11:12:22 +03:00
parent ec1efd2a49
commit 433a855659

View file

@ -22,6 +22,9 @@ const App = () => {
};
const onCoreStateChanged = () => {
setCoreInitialized(services.core.active || services.core.error instanceof Error);
if (services.core.active) {
services.core.dispatch({ action: 'LoadCtx' });
}
};
services.shell.on('stateChanged', onShellStateChanged);
services.core.on('stateChanged', onCoreStateChanged);