@ -33,7 +33,7 @@ const QuizProvider = ({ children }: QuizProviderProps) => {
useEffect(() => {
setTimer(totalTime)
setQuestions(quizQuestions)
}, [quizTopic])
}, [quizTopic, totalTime, quizQuestions]);
const quizDetails = {
totalQuestions,
@ -28,7 +28,7 @@ const useTimer = (
}, 1000)
return () => clearTimeout(countTimer)
}
}, [timer, setTimer])
}, [timer, setTimer, showResultModal])
export default useTimer