const STATION_UPDATE_REQUEST = "STATION_UPDATE_REQUEST";
const STATION_UPDATE_SUCCESS = "STATION_UPDATE_SUCCESS";
const STATION_UPDATE_ERROR = "STATION_UPDATE_ERROR";
  
const initialState = {
	data: [],
	createRequestPending: false
}
  
const stationUpdateReducer = (state = initialState, { type, payload }) => {
	switch(type) {
		case STATION_UPDATE_REQUEST:
			return {
				...state,
				createRequestPending: true
			};
		case STATION_UPDATE_SUCCESS:
			return {
				...state,
				data: payload.data,
				createRequestPending: false
			};
		case STATION_UPDATE_ERROR:
			return {
				...state,
				createRequestPending: false
			};
		default:
			return state;
	}
};
  
  export default stationUpdateReducer;