BREAKING CHANGES: Converted to use Redux stores. Login now working using Redux.
This commit is contained in:
35
client/src/redux/user/user.actions.js
Normal file
35
client/src/redux/user/user.actions.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import UserActionTypes from "./user.types";
|
||||
|
||||
export const signInSuccess = user => ({
|
||||
type: UserActionTypes.SIGN_IN_SUCCESS,
|
||||
payload: user
|
||||
});
|
||||
export const signInFailure = errorMsg => ({
|
||||
type: UserActionTypes.SIGN_IN_FAILURE,
|
||||
payload: errorMsg
|
||||
});
|
||||
|
||||
export const emailSignInStart = emailAndPassword => ({
|
||||
type: UserActionTypes.EMAIL_SIGN_IN_START,
|
||||
payload: emailAndPassword
|
||||
});
|
||||
|
||||
export const checkUserSession = () => ({
|
||||
type: UserActionTypes.CHECK_USER_SESSION
|
||||
});
|
||||
|
||||
export const signOutStart = () => ({
|
||||
type: UserActionTypes.SIGN_OUT_START
|
||||
});
|
||||
export const signOutSuccess = () => ({
|
||||
type: UserActionTypes.SIGN_OUT_SUCCESS
|
||||
});
|
||||
|
||||
export const signOutFailure = error => ({
|
||||
type: UserActionTypes.SIGN_OUT_FAILURE,
|
||||
payload: error
|
||||
});
|
||||
|
||||
export const unauthorizedUser = () => ({
|
||||
type: UserActionTypes.UNAUTHORIZED_USER
|
||||
});
|
||||
Reference in New Issue
Block a user