- Linting... Prettier...
This commit is contained in:
@@ -3,15 +3,15 @@ import { Map } from 'immutable';
|
||||
import { EVENTS_LOADED, GET_EVENTS } from '../constants/actionTypes.js';
|
||||
|
||||
export const events = (state = new Map(), action) => {
|
||||
switch (action.type) {
|
||||
case EVENTS_LOADED:
|
||||
const mapped = action.payload.toMap().mapEntries((entry) => {
|
||||
const [, event] = entry;
|
||||
return [`${event.id}`, event];
|
||||
});
|
||||
return state.merge(mapped);
|
||||
case GET_EVENTS:
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
switch (action.type) {
|
||||
case EVENTS_LOADED:
|
||||
const mapped = action.payload.toMap().mapEntries((entry) => {
|
||||
const [, event] = entry;
|
||||
return [`${event.id}`, event];
|
||||
});
|
||||
return state.merge(mapped);
|
||||
case GET_EVENTS:
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user