Initial commit

This commit is contained in:
Maksim Eltyshev
2019-08-31 04:07:25 +05:00
commit 36fe34e8e1
583 changed files with 91539 additions and 0 deletions
@@ -0,0 +1,18 @@
import { call, put, select } from 'redux-saga/effects';
import { deleteNotificationsRequest } from '../requests';
import { notificationIdsForCurrentCardSelector } from '../../../selectors';
import { deleteNotifications } from '../../../actions';
export function* deleteNotificationsService(ids) {
yield put(deleteNotifications(ids));
yield call(deleteNotificationsRequest, ids);
}
export function* deleteNotificationsInCurrentCardService() {
const notificationIds = yield select(notificationIdsForCurrentCardSelector);
if (notificationIds && notificationIds.length > 0) {
yield call(deleteNotificationsService, notificationIds);
}
}