mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
close auth loader fixed
This commit is contained in:
parent
60e70b4867
commit
c38bf2fd8e
1 changed files with 4 additions and 5 deletions
|
|
@ -259,22 +259,21 @@ const Intro = ({ queryParams }) => {
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case 'UserAuthenticated': {
|
case 'UserAuthenticated': {
|
||||||
closeLoaderModal();
|
closeLoaderModal();
|
||||||
window.location = '#/';
|
if (routeFocused) {
|
||||||
|
window.location = '#/';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Error': {
|
case 'Error': {
|
||||||
if (args.source.event === 'UserAuthenticated') {
|
if (args.source.event === 'UserAuthenticated') {
|
||||||
closeLoaderModal();
|
closeLoaderModal();
|
||||||
dispatch({ type: 'error', error: args.error.message });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (routeFocused) {
|
core.transport.on('Event', onEvent);
|
||||||
core.transport.on('Event', onEvent);
|
|
||||||
}
|
|
||||||
return () => {
|
return () => {
|
||||||
core.transport.off('Event', onEvent);
|
core.transport.off('Event', onEvent);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue