Skip to content
Snippets Groups Projects
Commit 1df42964 authored by Romain CREY's avatar Romain CREY
Browse files

WIP: notif challenge modal EcolyoRoyal

parent 62bdca2c
No related branches found
No related tags found
2 merge requests!61Dev,!57Resolve "déblocage badge Ecolyoroyal"
......@@ -24,6 +24,7 @@ const ChallengesList: React.FC<ChallengesListProps> = ({
refreshCurrentChallenge,
screenType,
toggleBackgroundScroll,
challengeNotification,
} = useContext(AppContext)
const challengeManager = new ChallengeManager(client)
const [
......@@ -108,12 +109,7 @@ const ChallengesList: React.FC<ChallengesListProps> = ({
setOngoingChallenge(ongoingChallengeTmp)
setOngoingChallengeModal(ongoingChallengeTmp)
setUserLevel(levelOfUser)
if (
await challengeManager.isChallengeOver(
ongoingChallengeTmp,
fluidTypes
)
) {
if (challengeNotification) {
setOpenChallengeModal(true)
toggleBackgroundScroll()
await challengeManager.endChallenge(ongoingChallengeTmp, fluidTypes)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment