We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17a5cb9 commit 906f9e7Copy full SHA for 906f9e7
src/context/QuizContextProvider.jsx
@@ -34,14 +34,16 @@ export const QuizContextProvider = ({ children }) => {
34
};
35
36
const handleNext = () => {
37
- currentQuestion < shuffleQuestions.length - 1
38
- ? setCurrentQuestion(currentQuestion + 1)
39
- : setCompleted(true),
+ if (currentQuestion < shuffleQuestions.length - 1) {
+ setCurrentQuestion(currentQuestion + 1);
+ } else {
40
+ setCompleted(true);
41
confetti({
42
particleCount: 150,
43
spread: 360,
44
origin: { y: 0.3, x: 0.5 },
45
});
46
+ }
47
48
setSelectedOption(null);
49
0 commit comments