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.

middleware.js 526B

1234567891011121314151617181920212223
  1. // @flow
  2. import { MiddlewareRegistry } from '../base/redux';
  3. import { OPEN_DESKTOP_APP } from './actionTypes';
  4. import { openDesktopApp } from './functions';
  5. /**
  6. * Implements the middleware of the deep linking feature.
  7. *
  8. * @param {Store} store - The redux store.
  9. * @returns {Function}
  10. */
  11. // eslint-disable-next-line no-unused-vars
  12. MiddlewareRegistry.register(store => next => action => {
  13. switch (action.type) {
  14. case OPEN_DESKTOP_APP:
  15. openDesktopApp();
  16. break;
  17. }
  18. return next(action);
  19. });