import { workspaceActionTypes } from '../action-types/workspace-actions.type';
const initialState = {
  allWorkspaces: {},
  currentWorkspace: {},
  allRoles: {},
};
export default (state = initialState, action) => {
  switch (action.type) {
    case workspaceActionTypes.GET_ALL_WORKSPACES:
      return { ...state, allWorkspaces: action.payload };

    case workspaceActionTypes.GET_CURRENT_WORSPACE:
      return { ...state, currentWorkspace: action.payload };

    case workspaceActionTypes.GET_ROLES:
      return { ...state, allRoles: action.payload };

    default:
      return state;
  }
};
