1 import { put, takeEvery } from 'redux-saga/effects';
3 import { removeNewUserInvite } from '@proton/pass/lib/invites/invite.requests';
5 newUserInviteRemoveFailure,
6 newUserInviteRemoveIntent,
7 newUserInviteRemoveSuccess,
8 } from '@proton/pass/store/actions';
10 function* removeInviteWorker({ payload, meta: { request } }: ReturnType<typeof newUserInviteRemoveIntent>) {
12 yield removeNewUserInvite(payload);
13 yield put(newUserInviteRemoveSuccess(request.id, payload.shareId, payload.newUserInviteId));
15 yield put(newUserInviteRemoveFailure(request.id, err));
19 export default function* watcher() {
20 yield takeEvery(newUserInviteRemoveIntent.match, removeInviteWorker);