Changeset befb988 for jobvista-frontend/src/views/auth
- Timestamp:
- 06/17/24 21:59:14 (5 months ago)
- Branches:
- main
- Children:
- 08f82ec
- Parents:
- b248810
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jobvista-frontend/src/views/auth/SignInForm.js
rb248810 rbefb988 8 8 import {yupResolver} from "@hookform/resolvers/yup"; 9 9 import {AuthActions} from "../../redux/actions/authActions"; 10 import {notifyIncorrectEmailOrPassword} from "../../utils/toastUtils"; 10 11 11 12 export const SignInForm = () => { … … 27 28 const signIn = async (values) => { 28 29 try { 29 dispatch(AuthActions.signIn(values.emailLog, values.passwordLog, 30 success => { 31 // createSnackbar({ 32 // message: success ? 'Successfully signed up.' : 'Error while signing up. Try again!', 33 // timeout: 2500, 34 // theme: success ? 'success' : 'error' 35 // }); 36 success && navigate("/"); 30 dispatch(AuthActions.signIn(values.emailLog, values.passwordLog, success => { 31 if(success) { 32 navigate("/") 33 } else { 34 notifyIncorrectEmailOrPassword() 35 } 37 36 })); 38 37 } catch (err) { 39 console.error(err);38 // console.error(err); 40 39 } 41 40 }
Note:
See TracChangeset
for help on using the changeset viewer.