fixed any bugs

This commit is contained in:
Amirhossein Mahmoodi
2023-08-07 14:23:09 +03:30
parent 92451c495a
commit f569273970
2 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@ node_modules
.next
.env.local
.idea
package-lock.json

View File

@@ -27,6 +27,7 @@ const LoginComponent = () => {
//formik properties
const handleSubmit = async (values, props) => {
Notifications(directionApp, t);
await axios
.post(GET_USER_TOKEN, {
username: values.username,
@@ -36,7 +37,7 @@ const LoginComponent = () => {
setToken(response.data.token);
})
.catch(function (error) {
Notifications(directionApp, error.response, t);
Notifications(directionApp, t, error.response);
props.setSubmitting(false);
});
};