import { ofType } from 'redux-observable';
import { concat, of } from 'rxjs';
import { switchMap } from 'rxjs/operators';

import { initEventAction } from '../slices';
import { initRequestEventAction } from '@/modules/@common/gql/redux/slices';

export default (action$) =>
  action$.pipe(
    ofType(initEventAction.type),
    switchMap(() => concat(of(initRequestEventAction()))),
  );
