diff options
author | V <vendicated@riseup.net> | 2023-04-15 02:27:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 02:27:11 +0200 |
commit | db7fc3769b40961f6fd0b64d092f9e9e82552018 (patch) | |
tree | 7ec8e4039a83c51e6098b38c0585bca101488f9a /src/components | |
parent | 6c719f5ee921d48eea671b026e6aff2c0c49e914 (diff) | |
download | Vencord-db7fc3769b40961f6fd0b64d092f9e9e82552018.tar.gz Vencord-db7fc3769b40961f6fd0b64d092f9e9e82552018.tar.bz2 Vencord-db7fc3769b40961f6fd0b64d092f9e9e82552018.zip |
Fix settings on Vencord Mobile (#905)
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/VencordSettings/index.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/VencordSettings/index.tsx b/src/components/VencordSettings/index.tsx index c15944c..b2916c4 100644 --- a/src/components/VencordSettings/index.tsx +++ b/src/components/VencordSettings/index.tsx @@ -21,6 +21,7 @@ import "./settingsStyles.css"; import { classNameFactory } from "@api/Styles"; import ErrorBoundary from "@components/ErrorBoundary"; import { handleComponentFailed } from "@components/handleComponentFailed"; +import { isMobile } from "@utils/misc"; import { Forms, SettingsRouter, TabBar, Text } from "@webpack/common"; import BackupRestoreTab from "./BackupRestoreTab"; @@ -55,7 +56,10 @@ if (!IS_WEB) SettingsTabs.VencordUpdater.component = () => Updater && <Updater / function Settings(props: SettingsProps) { const { tab = "VencordSettings" } = props; - const CurrentTab = SettingsTabs[tab]?.component; + const CurrentTab = SettingsTabs[tab]?.component ?? null; + if (isMobile) { + return CurrentTab && <CurrentTab />; + } return <Forms.FormSection> <Text variant="heading-lg/semibold" style={{ color: "var(--header-primary)" }} tag="h2">Vencord Settings</Text> |