Update src/plugins/betterBanReasons/index.tsx

Co-authored-by: vee <vendicated@riseup.net>
This commit is contained in:
Inbestigator 2024-06-09 13:04:13 -07:00 committed by GitHub
parent 4e0887fc67
commit 5834fd5568
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,11 +10,7 @@ import definePlugin, { OptionType } from "@utils/types";
import { Button, Forms, TextInput, useEffect, useState } from "@webpack/common";
function ReasonsComponent() {
const [reasons, setReasons] = useState(settings.store.reasons as string[]);
useEffect(() => {
settings.store.reasons = reasons;
}, [reasons]);
const { reasons } = settings.use(["reasons"]);
return (
<Forms.FormSection title="Reasons">