function createModalChannel() {
	return eventChannel((emit) => {
		$(document).on('hidden.bs.modal', '#modal', () => emit({ event: 'hideModal' }));
		$(document).on('show.bs.modal', '#modal', () => emit({ event: 'showModal' }));

		// returns unsubscribe function
		return () => {
			$(document).off('hide.bs.modal', '#modal');
			$(document).off('show.bs.modal', '#modal');
		}
	});
}
// This modal channel will pipe jQuery modal events to redux-saga to keep the state in sync
This modal channel will pipe jQuery modal events to redux-saga to keep the state in sync
This modal channel will pipe jQuery modal events to redux - saga to keep the state in sync
function createModalChannel() {
	return eventChannel((emit) => {
		$(document).on('hidden.bs.modal', '#modal', () => emit({ event: 'hideModal' }));
		$(document).on('show.bs.modal', '#modal', () => emit({ event: 'showModal' }));
		return () => {
			$(document).off('hide.bs.modal', '#modal');
			$(document).off('show.bs.modal', '#modal');
		}
	});
}
function createModalChannel ( ) { return eventChannel ( ( emit ) => { $ ( document ) . on ( 'hidden.bs.modal' , '#modal' , ( ) => emit ( { event : 'hideModal' } ) ) ; $ ( document ) . on ( 'show.bs.modal' , '#modal' , ( ) => emit ( { event : 'showModal' } ) ) ; return ( ) => { $ ( document ) . off ( 'hide.bs.modal' , '#modal' ) ; $ ( document ) . off ( 'show.bs.modal' , '#modal' ) ; } } ) ; }
This modal channel will pipe jQuery modal events to redux-saga to keep the state in sync
This modal channel will pipe jQuery modal events to redux - saga to keep the state in sync
// returns unsubscribe function