Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

reducer.js 658B

1234567891011121314151617181920212223242526272829
  1. // @flow
  2. import { PersistenceRegistry, ReducerRegistry } from '../base/redux';
  3. import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
  4. /**
  5. * The redux subtree of this feature.
  6. */
  7. const STORE_NAME = 'features/dropbox';
  8. /**
  9. * Sets up the persistence of the feature {@code dropbox}.
  10. */
  11. PersistenceRegistry.register(STORE_NAME);
  12. ReducerRegistry.register(STORE_NAME, (state = {}, action) => {
  13. switch (action.type) {
  14. case UPDATE_DROPBOX_TOKEN:
  15. return {
  16. ...state,
  17. token: action.token,
  18. rToken: action.rToken,
  19. expireDate: action.expireDate
  20. };
  21. default:
  22. return state;
  23. }
  24. });