|
|
@ -31,7 +31,10 @@ import { SettingsSyncer } from "@/stores/subtitles/SettingsSyncer"; |
|
|
|
import { ThemeProvider } from "@/stores/theme"; |
|
|
|
import { ThemeProvider } from "@/stores/theme"; |
|
|
|
import { TurnstileProvider } from "@/stores/turnstile"; |
|
|
|
import { TurnstileProvider } from "@/stores/turnstile"; |
|
|
|
|
|
|
|
|
|
|
|
import { extensionInfo } from "./backend/extension/messaging"; |
|
|
|
import { |
|
|
|
|
|
|
|
extensionInfo, |
|
|
|
|
|
|
|
isExtensionActiveCached, |
|
|
|
|
|
|
|
} from "./backend/extension/messaging"; |
|
|
|
import { initializeChromecast } from "./setup/chromecast"; |
|
|
|
import { initializeChromecast } from "./setup/chromecast"; |
|
|
|
import { initializeOldStores } from "./stores/__old/migrations"; |
|
|
|
import { initializeOldStores } from "./stores/__old/migrations"; |
|
|
|
|
|
|
|
|
|
|
@ -142,10 +145,10 @@ function TheRouter(props: { children: ReactNode }) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Checks if the extension is installed
|
|
|
|
// Checks if the extension is installed
|
|
|
|
function ExtensionInfoLoader() { |
|
|
|
function ExtensionStatus() { |
|
|
|
useAsync(async () => { |
|
|
|
if (!isExtensionActiveCached()) { |
|
|
|
await extensionInfo(); |
|
|
|
throw extensionInfo(); |
|
|
|
}, []); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
@ -159,7 +162,7 @@ root.render( |
|
|
|
<TurnstileProvider /> |
|
|
|
<TurnstileProvider /> |
|
|
|
<HelmetProvider> |
|
|
|
<HelmetProvider> |
|
|
|
<Suspense fallback={<LoadingScreen type="lazy" />}> |
|
|
|
<Suspense fallback={<LoadingScreen type="lazy" />}> |
|
|
|
<ExtensionInfoLoader /> |
|
|
|
<ExtensionStatus /> |
|
|
|
<ThemeProvider applyGlobal> |
|
|
|
<ThemeProvider applyGlobal> |
|
|
|
<ProgressSyncer /> |
|
|
|
<ProgressSyncer /> |
|
|
|
<BookmarkSyncer /> |
|
|
|
<BookmarkSyncer /> |
|
|
|