Fix useForm Hook Types

This commit is contained in:
2024-03-04 17:00:59 +08:00
parent 3ef694a468
commit b04b6c7ab8
5 changed files with 45 additions and 48 deletions
+2 -2
View File
@@ -22,7 +22,7 @@
margin-right: .5em;
}
}
.item:hover {
background-color: #eee;
}
@@ -53,7 +53,7 @@
}
}
}
.body {
padding: 1em;
}
+5 -4
View File
@@ -15,6 +15,10 @@ interface FormValue {
link: string;
desc: string;
tips: string;
author: string;
image: string;
sitename: string;
tags: string;
}
const getInfo = async () => {
@@ -50,10 +54,7 @@ function Read({ onBack }: ReadProps) {
const [count, setCount] = useState(0);
const { bindInput, setValues, onSubmit } = useForm<FormValue>({
initialValues: {
test: 'test',
},
onSubmit: (values) => {
submitForm(values);
tags: "",
},
});