Skip to content
Snippets Groups Projects
Commit ea69a9a1 authored by Pierre Ecarlat's avatar Pierre Ecarlat
Browse files

Merge branch 'attempt-fix-exploration' into 'dev'

fix: Attempt improvement exploration challenge

See merge request !1297
parents ef220976 88e3cb7c
No related branches found
No related tags found
1 merge request!1297fix: Attempt improvement exploration challenge
......@@ -86,17 +86,15 @@ const ChallengeCardOnGoing = ({
)
dispatch(updateUserChallengeList(updatedChallenge))
}
if (userChallenge.progress.quizProgress !== 5) navigate('/challenges/quiz')
if (!quizFinished) navigate('/challenges/quiz')
}
const goExploration = () => {
if (userChallenge.progress.explorationProgress !== 5)
navigate('/challenges/exploration')
if (!explorationFinished) navigate('/challenges/exploration')
}
const goAction = () => {
if (userChallenge.progress.actionProgress !== 5)
navigate('/challenges/action')
if (!actionFinished) navigate('/challenges/action')
}
useEffect(() => {
......@@ -124,9 +122,9 @@ const ChallengeCardOnGoing = ({
const unlockDuel = async () => {
if (
userChallenge.duel.state === UserDuelState.LOCKED &&
userChallenge.progress.actionProgress === 5 &&
userChallenge.progress.quizProgress === 5 &&
userChallenge.progress.explorationProgress === 5
quizFinished &&
explorationFinished &&
actionFinished
) {
const updatedChallenge = await challengeService.updateUserChallenge(
{
......@@ -147,7 +145,15 @@ const ChallengeCardOnGoing = ({
return () => {
subscribed = false
}
}, [currentDataload, userChallenge, dispatch, challengeService])
}, [
currentDataload,
userChallenge,
dispatch,
challengeService,
quizFinished,
explorationFinished,
actionFinished,
])
const quizButton = () => (
<Button
......
  • build-token @group_1518_bot_2801ee8bae68451533dcea1179b03710

    mentioned in commit 4951e6a6

    ·

    mentioned in commit 4951e6a6

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment