Skip to content

Commit e41f77b

Browse files
committed
Añdido confeti al finalizar juego
1 parent 844f534 commit e41f77b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/context/QuizContextProvider.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ export const QuizContextProvider = ({ children }) => {
3636
const handleNext = () => {
3737
currentQuestion < shuffleQuestions.length - 1
3838
? setCurrentQuestion(currentQuestion + 1)
39-
: setCompleted(true);
39+
: setCompleted(true),
40+
confetti({
41+
particleCount: 150,
42+
spread: 360,
43+
origin: { y: 0.3, x: 0.5 },
44+
});
4045

4146
setSelectedOption(null);
4247
};

0 commit comments

Comments
 (0)