mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
alert error if stremio-core failed to initialize
This commit is contained in:
parent
073be58307
commit
09be8bce0d
1 changed files with 5 additions and 1 deletions
|
|
@ -24,7 +24,11 @@ const App = () => {
|
|||
const [shellInitialized, setShellInitialized] = React.useState(false);
|
||||
React.useEffect(() => {
|
||||
const onCoreStateChanged = () => {
|
||||
setCoreInitialized(services.core.active);
|
||||
if (services.core.error) {
|
||||
alert(services.core.error);
|
||||
} else if (services.core.active) {
|
||||
setCoreInitialized(services.core.active);
|
||||
}
|
||||
};
|
||||
const onShellStateChanged = () => {
|
||||
setShellInitialized(services.shell.active || services.shell.error instanceof Error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue