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.

reducer.ts 636B

1234567891011121314151617181920212223242526272829303132
  1. import ReducerRegistry from '../base/redux/ReducerRegistry';
  2. import {
  3. SET_DETAILS
  4. } from './actionTypes';
  5. import { STATUSES } from './constants';
  6. const DEFAULT_STATE = {
  7. disabledFeatures: [],
  8. status: STATUSES.ACTIVE
  9. };
  10. export interface IJaaSState {
  11. [key: string]: any;
  12. }
  13. /**
  14. * Listen for actions that mutate the billing-counter state.
  15. */
  16. ReducerRegistry.register<IJaaSState>(
  17. 'features/jaas', (state = DEFAULT_STATE, action): IJaaSState => {
  18. switch (action.type) {
  19. case SET_DETAILS: {
  20. return action.payload;
  21. }
  22. default:
  23. return state;
  24. }
  25. }
  26. );