Added fingerprinting + store in firebase for user auth. BOD-132
This commit is contained in:
@@ -6,41 +6,44 @@ const INITIAL_STATE = {
|
||||
//language: "en-US"
|
||||
},
|
||||
bodyshop: null,
|
||||
error: null
|
||||
error: null,
|
||||
conflict: false,
|
||||
};
|
||||
|
||||
const userReducer = (state = INITIAL_STATE, action) => {
|
||||
switch (action.type) {
|
||||
case UserActionTypes.SET_INSTANCE_CONFLICT:
|
||||
return { ...state, conflict: true };
|
||||
case UserActionTypes.SIGN_IN_SUCCESS:
|
||||
return {
|
||||
...state,
|
||||
currentUser: action.payload,
|
||||
error: null
|
||||
error: null,
|
||||
};
|
||||
case UserActionTypes.SIGN_OUT_SUCCESS:
|
||||
return {
|
||||
...state,
|
||||
currentUser: { authorized: false },
|
||||
error: null
|
||||
error: null,
|
||||
};
|
||||
case UserActionTypes.UNAUTHORIZED_USER:
|
||||
return {
|
||||
...state,
|
||||
error: null,
|
||||
currentUser: { authorized: false }
|
||||
currentUser: { authorized: false },
|
||||
};
|
||||
case UserActionTypes.SET_USER_LANGUAGE:
|
||||
return {
|
||||
...state,
|
||||
language: action.payload
|
||||
language: action.payload,
|
||||
};
|
||||
case UserActionTypes.UPDATE_USER_DETAILS_SUCCESS:
|
||||
return {
|
||||
...state,
|
||||
currentUser: {
|
||||
...state.currentUser,
|
||||
...action.payload //Spread current user details in.
|
||||
}
|
||||
...action.payload, //Spread current user details in.
|
||||
},
|
||||
};
|
||||
|
||||
case UserActionTypes.SET_SHOP_DETAILS:
|
||||
@@ -50,7 +53,7 @@ const userReducer = (state = INITIAL_STATE, action) => {
|
||||
case UserActionTypes.EMAIL_SIGN_UP_FAILURE:
|
||||
return {
|
||||
...state,
|
||||
error: action.payload
|
||||
error: action.payload,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user