Skip to content

Commit

Permalink
move setNewUser tond of method
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarsh-scottlogic committed Mar 19, 2024
1 parent 59e2cf2 commit 55e10e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/components/MainComponent/MainComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ function MainComponent({
async function resetProgress() {
console.log('resetting progress for all levels');
resetCompletedLevels();
// set as new user so welcome modal shows
setIsNewUser(true);

const resetServiceResult = await resetService.resetAllLevelProgress(
currentLevel
Expand All @@ -346,6 +344,9 @@ function MainComponent({
// game state will be updated by the [currentLevel] useEffect
setCurrentLevel(LEVEL_NAMES.LEVEL_1);
}

// set as new user so welcome modal shows
setIsNewUser(true);
}

function openResetProgressOverlay() {
Expand Down

0 comments on commit 55e10e9

Please sign in to comment.