13 lines
309 B
JavaScript
13 lines
309 B
JavaScript
import { SET_ACTIVE_EVENT, UNSET_ACTIVE_EVENT } from '../constants/actionTypes.js';
|
|
|
|
export const activeEvent = (state = null, action) => {
|
|
switch (action.type) {
|
|
case SET_ACTIVE_EVENT:
|
|
return action.payload;
|
|
case UNSET_ACTIVE_EVENT:
|
|
return null;
|
|
default:
|
|
return state;
|
|
}
|
|
};
|