From e2f1f8274b2212bffad7099c72a20a073333409e Mon Sep 17 00:00:00 2001 From: Jorrin Date: Mon, 15 Apr 2024 23:17:21 +0200 Subject: [PATCH] add global extension check --- src/index.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index d5fffaae..29d76566 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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 {props.children}; } +// 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( }> +