- more!
This commit is contained in:
12
app/reducers/activeItem.js
Normal file
12
app/reducers/activeItem.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { SET_ACTIVE_ITEM, UNSET_ACTIVE_ITEM } from '../constants/actionTypes.js';
|
||||
|
||||
export const activeItem = (state = null, action) => {
|
||||
switch (action.type) {
|
||||
case SET_ACTIVE_ITEM:
|
||||
return action.payload;
|
||||
case UNSET_ACTIVE_ITEM:
|
||||
return null;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
11
app/reducers/auctionFilter.js
Normal file
11
app/reducers/auctionFilter.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { SET_ITEM_FILTER } from '../constants/actionTypes.js';
|
||||
import { ITEM_FILTERS } from '../constants/constants.js';
|
||||
|
||||
export const itemFilter = (state = ITEM_FILTERS.ALL, action) => {
|
||||
switch (action.type) {
|
||||
case SET_AUCTION_FILTER:
|
||||
return action.payload;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
11
app/reducers/auctionView.js
Normal file
11
app/reducers/auctionView.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { SET_AUCTION_VIEW_MODE } from '../constants/actionTypes.js';
|
||||
import { AUCTION_VIEW_MODES } from '../constants/constants.js';
|
||||
|
||||
export const auctionView = (state = AUCTION_VIEW_MODES.ALL, action) => {
|
||||
switch (action.type) {
|
||||
case SET_AUCTION_VIEW_MODE:
|
||||
return action.payload;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
@@ -1,14 +1,20 @@
|
||||
import { combineReducers } from 'redux-immutable';
|
||||
|
||||
import { activeEvent } from './activeEvent.js';
|
||||
import { activeItem } from './activeItem.js';
|
||||
import { auctionFilter } from './auctionFilter.js';
|
||||
import { auctions } from './auctions.js';
|
||||
import { auctionView } from './auctionView.js';
|
||||
import { blockUI } from './blockUI.js';
|
||||
import { events } from './events.js';
|
||||
import { items } from './items.js';
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
activeEvent,
|
||||
activeItem,
|
||||
auctionFilter,
|
||||
auctions,
|
||||
auctionView,
|
||||
blockUI,
|
||||
events,
|
||||
items,
|
||||
|
||||
Reference in New Issue
Block a user