import { combineReducers } from 'redux'
import { ENROLL_PROJECT, ENROLL_PROJECT_ERROR } from '../../EnrollForm/actions'

export const error = (state = null, action) => {
  switch (action.type) {
    case ENROLL_PROJECT:
      return null
    case ENROLL_PROJECT_ERROR:
      return action.error.message
    default:
      return state
  }
}

export default combineReducers({
  error
})
