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