Forked from
KSZK / DevTeam / kszkepzes / old / kszkepzes-frontend
308 commits behind the upstream repository.
-
Chif Gergő authoredChif Gergő authored
TraineeReducer.js 382 B
import { GET_TRAINEES, GET_TRAINEE_BY_ID } from '../actions/types';
const INITIAL_STATE = {};
export default (state = INITIAL_STATE, action) => {
switch (action.type) {
case GET_TRAINEES:
return { ...state, trainees: [...action.payload] };
case GET_TRAINEE_BY_ID:
return { ...state, selectedTrainee: action.payload };
default:
return state;
}
};