From e57d4578a29ab3affc8cd43673ffc5150b65e407 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sat, 21 Oct 2023 22:14:54 +0200 Subject: [PATCH] remove some old stuff --- src/components/CaptionColorSelector.tsx | 30 ------------------------- src/index.tsx | 3 +-- src/setup/config.ts | 12 ---------- 3 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 src/components/CaptionColorSelector.tsx diff --git a/src/components/CaptionColorSelector.tsx b/src/components/CaptionColorSelector.tsx deleted file mode 100644 index 7df66320..00000000 --- a/src/components/CaptionColorSelector.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { useSettings } from "@/state/settings"; - -import { Icon, Icons } from "./Icon"; - -export const colors = ["#ffffff", "#00ffff", "#ffff00"]; -export default function CaptionColorSelector({ color }: { color: string }) { - const { captionSettings, setCaptionColor } = useSettings(); - return ( -
setCaptionColor(color)} - > -
- -
- ); -} diff --git a/src/index.tsx b/src/index.tsx index b96fc3a2..84d3a93e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -8,7 +8,7 @@ import { registerSW } from "virtual:pwa-register"; import { ErrorBoundary } from "@/components/layout/ErrorBoundary"; import App from "@/setup/App"; -import { assertConfig, conf } from "@/setup/config"; +import { conf } from "@/setup/config"; import i18n from "@/setup/i18n"; import "@/setup/ga"; @@ -29,7 +29,6 @@ registerSW({ }); const LazyLoadedApp = React.lazy(async () => { - await assertConfig(); await initializeStores(); i18n.changeLanguage(SettingsStore.get().language ?? "en"); return { diff --git a/src/setup/config.ts b/src/setup/config.ts index a7d9067b..36c4b66f 100644 --- a/src/setup/config.ts +++ b/src/setup/config.ts @@ -39,18 +39,6 @@ function getKey(key: keyof Config, defaultString?: string): string { return getKeyValue(key) ?? defaultString ?? ""; } -export function assertConfig() { - const keys: Array = ["TMDB_READ_API_KEY", "CORS_PROXY_URL"]; - const values = keys.map((key) => { - const val = getKeyValue(key); - if (val) return val; - // eslint-disable-next-line no-alert - window.alert(`Misconfigured instance, missing key: ${key}`); - return val; - }); - if (values.includes(undefined)) throw new Error("Misconfigured instance"); -} - export function conf(): RuntimeConfig { return { APP_VERSION,