refactor: use non-asyc version of mutate
This commit is contained in:
@@ -12,20 +12,17 @@ import useFormatMessage from 'hooks/useFormatMessage';
|
||||
export default function ForgotPasswordForm() {
|
||||
const formatMessage = useFormatMessage();
|
||||
const {
|
||||
mutateAsync: forgotPassword,
|
||||
mutate: forgotPassword,
|
||||
isPending: loading,
|
||||
isSuccess,
|
||||
isError,
|
||||
error,
|
||||
} = useForgotPassword();
|
||||
|
||||
const handleSubmit = async (values) => {
|
||||
const { email } = values;
|
||||
try {
|
||||
await forgotPassword({
|
||||
const handleSubmit = ({ email }) => {
|
||||
forgotPassword({
|
||||
email,
|
||||
});
|
||||
} catch {}
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user