Fix useForm Hook Types
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
margin-right: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.body {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
+5
-4
@@ -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: "",
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user