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.

actions.web.js 554B

1234567891011121314151617181920212223
  1. // @flow
  2. import { type Dispatch } from 'redux';
  3. import { maybeRedirectToWelcomePage } from '../app/actions';
  4. export * from './actions.any';
  5. declare var APP: Object;
  6. /**
  7. * Cancels the ongoing knocking and abandons the join flow.
  8. *
  9. * @returns {Function}
  10. */
  11. export function cancelKnocking() {
  12. return async (dispatch: Dispatch<any>) => {
  13. // when we are redirecting the library should handle any
  14. // unload and clean of the connection.
  15. APP.API.notifyReadyToClose();
  16. dispatch(maybeRedirectToWelcomePage());
  17. };
  18. }