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.js 570B

1234567891011121314151617181920212223242526272829
  1. import { ReducerRegistry } from '../base/redux';
  2. import {
  3. SET_ENDPOINT_COUNTED
  4. } from './actionTypes';
  5. const DEFAULT_STATE = {
  6. endpointCounted: false
  7. };
  8. /**
  9. * Listen for actions that mutate the billing-counter state
  10. */
  11. ReducerRegistry.register(
  12. 'features/billing-counter', (state = DEFAULT_STATE, action) => {
  13. switch (action.type) {
  14. case SET_ENDPOINT_COUNTED: {
  15. return {
  16. ...state,
  17. endpointCounted: true
  18. };
  19. }
  20. default:
  21. return state;
  22. }
  23. },
  24. );