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.native.ts 584B

1234567891011121314151617181920212223
  1. import { batch } from 'react-redux';
  2. import { appNavigate } from '../app/actions.native';
  3. import { IStore } from '../app/types';
  4. import { hideLobbyScreen, setKnockingState } from './actions.any';
  5. export * from './actions.any';
  6. /**
  7. * Cancels the ongoing knocking and abandons the join flow.
  8. *
  9. * @returns {Function}
  10. */
  11. export function cancelKnocking() {
  12. return (dispatch: IStore['dispatch']) => {
  13. batch(() => {
  14. dispatch(setKnockingState(false));
  15. dispatch(hideLobbyScreen());
  16. dispatch(appNavigate(undefined));
  17. });
  18. };
  19. }