|
|
@ -13,7 +13,7 @@ export default function Setting() { |
|
|
|
|
|
|
|
const addrInput = useRef<HTMLInputElement>(null); |
|
|
|
const [standbyPickerVisible, setStandbyPickerVisible] = useState(false); |
|
|
|
const [selectStandby, setSelectStandby] = useState<number[]>([20]); |
|
|
|
const [selectStandby, setSelectStandby] = useState<number[]>([context.setting.standbyMinutes]); |
|
|
|
// const [addr, setAddr] = useState('');
|
|
|
|
// const [port, setPort] = useState<number>(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; |
|
|
|