fix: add preventdefault for form submit

This commit is contained in:
shuai 2023-05-06 18:48:14 +08:00
parent bc9c4ef1b9
commit 225d766f9c
1 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,10 @@ const Index: FC = () => {
});
};
const postEmail = () => {
const postEmail = (event?: any) => {
if (event) {
event.preventDefault();
}
const params: any = {
e_mail: formData.e_mail.value,
pass: formData.pass.value,