From 1c0ac3b69c3f8b05232dd51d9cf62c60b2ce57c6 Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Tue, 8 Apr 2025 15:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug:=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E7=9A=84=E5=BE=85=E6=9C=BA=E6=97=B6=E9=97=B4=20=E6=9C=AA?= =?UTF-8?q?=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Setting.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Setting.tsx b/src/pages/Setting.tsx index af65077..27c789e 100644 --- a/src/pages/Setting.tsx +++ b/src/pages/Setting.tsx @@ -13,7 +13,7 @@ export default function Setting() { const addrInput = useRef(null); const [standbyPickerVisible, setStandbyPickerVisible] = useState(false); - const [selectStandby, setSelectStandby] = useState([20]); + const [selectStandby, setSelectStandby] = useState([context.setting.standbyMinutes]); // const [addr, setAddr] = useState(''); // const [port, setPort] = useState(80); @@ -33,7 +33,8 @@ export default function Setting() { if (addrInput.current && context.setting.server) { addrInput.current!.value = context.setting.server; } - }, [context.setting.server]); + setSelectStandby([context.setting.standbyMinutes]); + }, [context.setting]); const onSaveClick = async () => { const server = addrInput.current!.value;