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 499B

12345678910111213141516171819202122
  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. MiddlewareRegistry.register(store => next => action => {
  12. switch (action.type) {
  13. case OPEN_DESKTOP_APP:
  14. openDesktopApp(store.getState());
  15. break;
  16. }
  17. return next(action);
  18. });