summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorMetaCubeX <[email protected]>2022-11-03 00:55:50 +0800
committerGitHub <[email protected]>2022-11-03 00:55:50 +0800
commitd716a9aa50b7da5f338c3f953f968662fb8d5f6f (patch)
tree0d5c1d2debe853b804cc210993bb63ccd7983147 /src/components
parentde69f7cc45b935796f7ede1ebcd0de9706bfcfb7 (diff)
parentc409d9e6483036dea6d6b47642080538d599f43f (diff)
Merge pull request #4 from kaniwow/master
fix: variable declaration and show tun stack correctly
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Config.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/Config.tsx b/src/components/Config.tsx
index 1c1ca02..28b7df1 100644
--- a/src/components/Config.tsx
+++ b/src/components/Config.tsx
@@ -120,14 +120,14 @@ function ConfigImpl({
}, [dispatch]);
const setConfigState = useCallback(
- (name, val) => {
+ (name: any, val: any) => {
setConfigStateInternal({ ...configState, [name]: val });
},
[configState]
);
const setTunConfigState = useCallback(
- (name, val) => {
+ (name: any, val: any) => {
const tun = {...configState.tun, [name]: val }
setConfigStateInternal({ ...configState, tun: {...tun}});
},
@@ -171,14 +171,14 @@ function ConfigImpl({
);
const handleInputOnChange = useCallback(
- (e) => handleChangeValue(e.target),
+ (e: { target: { name: any; value: any; }; }) => handleChangeValue(e.target),
[handleChangeValue]
);
const { selectChartStyleIndex, updateAppConfig } = useStoreActions();
const handleInputOnBlur = useCallback(
- (e) => {
+ (e: { target: any; }) => {
const target = e.target;
const { name, value } = target;
switch (name) {