chore: fix form event in firefox

This commit is contained in:
Steven committed 2023-07-23 02:09:50 +08:00
1 parent 11205566ac
commit 86078b097d
2 files changed
+6 -4

No files matched your search

+3 -2
View File
@@ -1,5 +1,5 @@
import { Button, Input } from "@mui/joy";
import React, { useEffect, useState } from "react";
import React, { FormEvent, useEffect, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { toast } from "react-hot-toast";
import * as api from "../helpers/api";
@@ -44,7 +44,8 @@ const SignIn: React.FC = () => {
setPassword(text);
};
const handleSigninBtnClick = async () => {
const handleSigninBtnClick = async (e: FormEvent) => {
e.preventDefault();
if (actionBtnLoadingState.isLoading) {
return;
}
+3 -2
View File
@@ -1,5 +1,5 @@
import { Button, Input } from "@mui/joy";
import React, { useEffect, useState } from "react";
import React, { FormEvent, useEffect, useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { toast } from "react-hot-toast";
import * as api from "../helpers/api";
@@ -48,7 +48,8 @@ const SignUp: React.FC = () => {
setPassword(text);
};
const handleSignupBtnClick = async () => {
const handleSignupBtnClick = async (e: FormEvent) => {
e.preventDefault();
if (actionBtnLoadingState.isLoading) {
return;
}