You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
502 B

8 years ago
import { setBikes, setBikesFetched, setBikesIsFetching } from './actions';
import { handleActions } from 'redux-actions';
export default handleActions({
[setBikes]: (state, action) => ({
...state,
8 years ago
entities: action.payload.entities.bikes,
}),
[setBikesIsFetching]: (state, action) => ({
...state,
8 years ago
isFetching: action.payload,
}),
[setBikesFetched]: (state, action) => ({
...state,
8 years ago
fetched: action.payload,
}),
8 years ago
}, { entities: {}, isFetching: false, fetched: false });