1 import { put, takeLeading } from 'redux-saga/effects';
3 import { signoutIntent, signoutSuccess } from '@proton/pass/store/actions';
4 import type { RootSagaOptions } from '@proton/pass/store/types';
6 function* signoutIntentWorker({ getAuthService }: RootSagaOptions, action: ReturnType<typeof signoutIntent>) {
7 yield getAuthService().logout({ soft: action.payload.soft });
8 yield put(signoutSuccess(action.payload));
11 export default function* watcher(options: RootSagaOptions) {
12 yield takeLeading(signoutIntent.match, signoutIntentWorker, options);