diff --git a/client/src/templates/Challenges/redux/current-challenge-saga.js b/client/src/templates/Challenges/redux/current-challenge-saga.js index 17ef4b4a18d..cf1e61328e9 100644 --- a/client/src/templates/Challenges/redux/current-challenge-saga.js +++ b/client/src/templates/Challenges/redux/current-challenge-saga.js @@ -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() {