import {
  PROJECT_DETAIL,
  PROJECT_LIST
} from '@constants/project'


const INITIAL_STATE = {
  proList: {},
  projectDetail: {}
}

export default function project(state = INITIAL_STATE, action) {
  switch (action.type) {
    case PROJECT_LIST: {
      return {
        ...state,
        proList: {
          ...action.payload
        }
      }
    }
    case PROJECT_DETAIL: {
      return {
        ...state,
        projectDetail: {
          ...action.payload
        }
      }
    }

    default:
      return state
  }
}
