1 import { put, takeEvery } from 'redux-saga/effects';
3 import { removeInvite } from '@proton/pass/lib/invites/invite.requests';
4 import { inviteRemoveFailure, inviteRemoveIntent, inviteRemoveSuccess } from '@proton/pass/store/actions';
6 function* removeInviteWorker({ payload, meta: { request } }: ReturnType<typeof inviteRemoveIntent>) {
8 yield removeInvite(payload);
9 yield put(inviteRemoveSuccess(request.id, payload.shareId, payload.inviteId));
11 yield put(inviteRemoveFailure(request.id, err));
15 export default function* watcher() {
16 yield takeEvery(inviteRemoveIntent.match, removeInviteWorker);