fix: comments out update-my-current-challenge call (#46028)

pull/46030/head
Oliver Eyton-Williams 2022-05-17 22:37:29 +02:00 committed by GitHub
parent 9acd8798fd
commit 301c2a598a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 25 deletions

View File

@ -1,36 +1,30 @@
import { put, select, takeEvery } from 'redux-saga/effects';
import { put, takeEvery } from 'redux-saga/effects';
import store from 'store';
import {
isSignedInSelector,
updateComplete,
updateFailed
} from '../../../redux';
import { randomCompliment } from '../../../utils/get-words';
import { updateSuccessMessage } from './';
export const CURRENT_CHALLENGE_KEY = 'currentChallengeId';
export function* currentChallengeSaga({ payload: id }) {
store.set(CURRENT_CHALLENGE_KEY, id);
const isSignedIn = yield select(isSignedInSelector);
if (isSignedIn) {
const update = {
endpoint: '/update-my-current-challenge',
payload: {
currentChallengeId: id
}
};
try {
// Temporarily removed to reduce calls to database
// will need to re-import things at the top
// yield call(post, update.endpoint, update.payload);
yield put(updateComplete());
} catch {
yield put(updateFailed(update));
}
}
yield store.set(CURRENT_CHALLENGE_KEY, id);
// // Temporarily removed to reduce calls to database
// // will need to re-import things at the top
// // yield call(post, update.endpoint, update.payload);
// const isSignedIn = yield select(isSignedInSelector);
// if (isSignedIn) {
// const update = {
// endpoint: '/update-my-current-challenge',
// payload: {
// currentChallengeId: id
// }
// };
// try {
// yield put(updateComplete());
// } catch {
// yield put(updateFailed(update));
// }
// }
}
export function* updateSuccessMessageSaga() {