mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-13 07:55:06 +01:00
add global extension check
This commit is contained in:
parent
f248a5ff61
commit
e2f1f8274b
@ -31,6 +31,7 @@ import { SettingsSyncer } from "@/stores/subtitles/SettingsSyncer";
|
||||
import { ThemeProvider } from "@/stores/theme";
|
||||
import { TurnstileProvider } from "@/stores/turnstile";
|
||||
|
||||
import { extensionInfo } from "./backend/extension/messaging";
|
||||
import { initializeChromecast } from "./setup/chromecast";
|
||||
import { initializeOldStores } from "./stores/__old/migrations";
|
||||
|
||||
@ -140,6 +141,15 @@ function TheRouter(props: { children: ReactNode }) {
|
||||
return <HashRouter>{props.children}</HashRouter>;
|
||||
}
|
||||
|
||||
// Checks if the extension is installed
|
||||
function ExtensionInfoLoader() {
|
||||
useAsync(async () => {
|
||||
await extensionInfo();
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
const container = document.getElementById("root");
|
||||
const root = createRoot(container!);
|
||||
|
||||
@ -149,6 +159,7 @@ root.render(
|
||||
<TurnstileProvider />
|
||||
<HelmetProvider>
|
||||
<Suspense fallback={<LoadingScreen type="lazy" />}>
|
||||
<ExtensionInfoLoader />
|
||||
<ThemeProvider applyGlobal>
|
||||
<ProgressSyncer />
|
||||
<BookmarkSyncer />
|
||||
|
Loading…
Reference in New Issue
Block a user