import { PENJADWALAN_CREATE_REQUEST, PENJADWALAN_CREATE_SUCCESS, PENJADWALAN_CREATE_FAIL, PENJADWALAN_CREATE_RESET } from "../actions/penjadwalan";

export const penjadwalanCreateReducer = (state = {}, action) => {
	switch (action.type) {
		case PENJADWALAN_CREATE_REQUEST:
			return { loading: true };
		case PENJADWALAN_CREATE_SUCCESS:
			return { loading: false, success: true, data: action.payload };
		case PENJADWALAN_CREATE_FAIL:
			return { loading: false, error: action.payload };
		case PENJADWALAN_CREATE_RESET:
			return {};
		default:
			return state;
	}
};
