diff --git a/src/components/profile/info-editor.tsx b/src/components/profile/info-editor.tsx index 941dc62..4044dba 100644 --- a/src/components/profile/info-editor.tsx +++ b/src/components/profile/info-editor.tsx @@ -4,6 +4,7 @@ import { useLockFn, useSetState } from "ahooks"; import { useTranslation } from "react-i18next"; import { Button, + Collapse, Dialog, DialogActions, DialogContent, @@ -121,18 +122,7 @@ const InfoEditor = (props: Props) => { /> )} - {showOpt && ( - setOption({ user_agent: e.target.value })} - onKeyDown={(e) => e.key === "Enter" && onUpdate()} - /> - )} - - {((type === "remote" && showOpt) || type === "local") && ( + {(type === "remote" || type === "local") && ( { /> )} - {form.type === "remote" && showOpt && ( + + setOption({ user_agent: e.target.value })} + onKeyDown={(e) => e.key === "Enter" && onUpdate()} + /> + { /> } /> - )} - {form.type === "remote" && showOpt && ( { /> } /> - )} +