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.

12345678910111213141516171819202122
  1. import ReducerRegistry from '../redux/ReducerRegistry';
  2. import { SET_LAST_N } from './actionTypes';
  3. export interface ILastNState {
  4. lastN?: number;
  5. }
  6. ReducerRegistry.register<ILastNState>('features/base/lastn', (state = {}, action): ILastNState => {
  7. switch (action.type) {
  8. case SET_LAST_N: {
  9. const { lastN } = action;
  10. return {
  11. ...state,
  12. lastN
  13. };
  14. }
  15. }
  16. return state;
  17. });