mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-30 14:58:52 +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) {
|
||||
case 'UserAuthenticated': {
|
||||
closeLoaderModal();
|
||||
window.location = '#/';
|
||||
if (routeFocused) {
|
||||
window.location = '#/';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'Error': {
|
||||
if (args.source.event === 'UserAuthenticated') {
|
||||
closeLoaderModal();
|
||||
dispatch({ type: 'error', error: args.error.message });
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
if (routeFocused) {
|
||||
core.transport.on('Event', onEvent);
|
||||
}
|
||||
core.transport.on('Event', onEvent);
|
||||
return () => {
|
||||
core.transport.off('Event', onEvent);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue