diff options
author | Vendicated <vendicated@riseup.net> | 2023-01-25 17:49:19 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-01-25 17:49:19 +0100 |
commit | 103cd143613a9edb2217d1a19cfb34e086b40820 (patch) | |
tree | 18b53430c9108709b4d9b0cdf31a0d00329fd6ee /src/components | |
parent | 41226f0358a7605e2fb668e7b6df30f658c79289 (diff) | |
download | Vencord-103cd143613a9edb2217d1a19cfb34e086b40820.tar.gz Vencord-103cd143613a9edb2217d1a19cfb34e086b40820.tar.bz2 Vencord-103cd143613a9edb2217d1a19cfb34e086b40820.zip |
Fix Themes Tab
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/VencordSettings/ThemesTab.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
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<HTMLTextAreaElement>(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} |