my cases portal module by loggedin user
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export const AccountDetailsDataActionTypes = {
|
||||
GETACCOUNTDETAILSDATA: "GETACCOUNTDETAILSDATA",
|
||||
SETACCOUNTDETAILSDATA: "SETACCOUNTDETAILSDATA",
|
||||
SETLOGGEDINUSER: "SETLOGGEDINUSER",
|
||||
};
|
||||
|
||||
export const getAccountDetailsObj = () => (dispatch) => {
|
||||
@@ -16,6 +17,13 @@ export const setAccountDetails = (accountDetails) => (dispatch) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const setLoggedInUserId = (loggedinUserId) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: AccountDetailsDataActionTypes.SETLOGGEDINUSER,
|
||||
loggedinUserId: loggedinUserId,
|
||||
});
|
||||
};
|
||||
|
||||
export const setLogout = () => (dispatch) => {
|
||||
return dispatch({
|
||||
type: "USER_LOGOUT",
|
||||
|
||||
@@ -2,6 +2,7 @@ import { AccountDetailsDataActionTypes } from "./action";
|
||||
|
||||
const AccountDetailsDataInitialState = {
|
||||
accountDetails: {},
|
||||
loggedinUserId: "",
|
||||
};
|
||||
|
||||
export default function reducer(
|
||||
@@ -14,6 +15,11 @@ export default function reducer(
|
||||
...state,
|
||||
accountDetails: action.accountDetails,
|
||||
};
|
||||
case AccountDetailsDataActionTypes.SETLOGGEDINUSER:
|
||||
return {
|
||||
...state,
|
||||
loggedinUserId: action.loggedinUserId,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user