2022-11-23 09:12:26 +00:00
|
|
|
import { maybeRedirectToWelcomePage } from '../app/actions.web';
|
|
|
|
import { IStore } from '../app/types';
|
2020-04-15 13:13:43 +00:00
|
|
|
|
2021-09-23 09:12:31 +00:00
|
|
|
export * from './actions.any';
|
2020-04-15 13:13:43 +00:00
|
|
|
|
|
|
|
/**
|
2021-09-23 09:12:31 +00:00
|
|
|
* Cancels the ongoing knocking and abandons the join flow.
|
2020-04-15 13:13:43 +00:00
|
|
|
*
|
|
|
|
* @returns {Function}
|
|
|
|
*/
|
|
|
|
export function cancelKnocking() {
|
2022-11-23 09:12:26 +00:00
|
|
|
return async (dispatch: IStore['dispatch']) => {
|
2021-09-23 09:12:31 +00:00
|
|
|
// when we are redirecting the library should handle any
|
|
|
|
// unload and clean of the connection.
|
|
|
|
APP.API.notifyReadyToClose();
|
|
|
|
dispatch(maybeRedirectToWelcomePage());
|
2020-05-20 08:25:31 +00:00
|
|
|
};
|
2020-04-15 13:13:43 +00:00
|
|
|
}
|