From 103cd143613a9edb2217d1a19cfb34e086b40820 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 25 Jan 2023 17:49:19 +0100 Subject: Fix Themes Tab --- src/components/VencordSettings/ThemesTab.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/VencordSettings') diff --git a/src/components/VencordSettings/ThemesTab.tsx b/src/components/VencordSettings/ThemesTab.tsx index b59590c..b2cf85b 100644 --- a/src/components/VencordSettings/ThemesTab.tsx +++ b/src/components/VencordSettings/ThemesTab.tsx @@ -75,11 +75,11 @@ function Validators({ themeLinks }: { themeLinks: string[]; }) { export default ErrorBoundary.wrap(function () { const settings = useSettings(); - const ref = React.useRef(null); + const [themeText, setThemeText] = React.useState(settings.themeLinks.join("\n")); function onBlur() { settings.themeLinks = [...new Set( - ref.current!.value + themeText .trim() .split(/\n+/) .map(s => s.trim()) @@ -119,8 +119,8 @@ export default ErrorBoundary.wrap(function () { padding: ".5em", border: "1px solid var(--background-modifier-accent)" }} - ref={ref} - defaultValue={settings.themeLinks.join("\n")} + value={themeText} + onChange={e => setThemeText(e.currentTarget.value)} className={TextAreaProps.textarea} placeholder="Theme Links" spellCheck={false} -- cgit