fix: cw setting could not store

This commit is contained in:
sevichecc 2023-04-15 04:49:59 +08:00
parent bda1804b6a
commit 57cd5db168
Signed by untrusted user who does not match committer: SevicheCC
GPG key ID: C577000000000000

View file

@ -75,8 +75,8 @@ export default function SimpleCommand(props: CommandProps) {
}
};
const handleCw = () => {
setShowCw(!showCw);
const handleCw = (value:boolean) => {
setShowCw(value);
if (cwRef.current) {
cwRef.current.focus();
}
@ -93,7 +93,7 @@ export default function SimpleCommand(props: CommandProps) {
</ActionPanel>
}
>
{fqn && <Form.Description title="Account" text={fqn} />}
<Form.Description title="Account" text={fqn} />
{showCw && (
<Form.TextField
id="spoiler_text"