Skip to content

Commit

Permalink
fix: bomb quiz
Browse files Browse the repository at this point in the history
  • Loading branch information
rabyeoljji committed Dec 21, 2024
1 parent 0c9e97c commit c6acbb3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/features/quiz/screen/quiz-view/hooks/use-bomb-quiz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,16 @@ export const useBombQuiz = (key: Date) => {
updateWrongQuizResultMutate(
{ quizzes: results },
{
onSuccess: () => {
onSuccess: async () => {
if (hasNextQuiz) {
navigateToNext(currentIndex)
} else {
setBombQuizList([])
const result = await refetchAdditionalData()
if (result.data?.quizzes.length) {
window.location.replace('/quiz/bomb')
} else {
setBombQuizList([])
}
}
},
onError: () => {
Expand Down

0 comments on commit c6acbb3

Please sign in to comment.