1- import { useEffect , useState } from "react" ;
1+ import { useEffect , useState , type FC } from "react" ;
22import Image from "next/image" ;
33import { Question } from "./types" ;
44import { FieldArray , FormikProvider , Field , useFormik } from "formik" ;
5+ import { useForm } from "react-hook-form" ;
56import { Button } from "./Button" ;
67import useResults from "@azure-fundamentals/hooks/useResults" ;
78
@@ -24,7 +25,7 @@ type Props = {
2425 images ?: { url : string ; alt : string } [ ] ;
2526} ;
2627
27- const QuizExamForm : React . FC < Props > = ( {
28+ const QuizExamForm : FC < Props > = ( {
2829 isLoading,
2930 handleNextQuestion,
3031 handleSkipQuestion,
@@ -44,7 +45,7 @@ const QuizExamForm: React.FC<Props> = ({
4445} ) => {
4546 const [ showCorrectAnswer , setShowCorrectAnswer ] = useState < boolean > ( false ) ;
4647 const [ savedAnswers , setSavedAnswers ] = useState < any > ( [ ] ) ;
47- const { points, reCount } = useResults ( savedAnswers ) ;
48+ const { points, reCount } = useResults ( ) ;
4849 const [ selectedImage , setSelectedImage ] = useState < {
4950 url : string ;
5051 alt : string ;
@@ -301,7 +302,9 @@ const QuizExamForm: React.FC<Props> = ({
301302 } `}
302303 >
303304 < svg
304- className = { `border ${ noOfAnswers > 1 ?"rounded" :"rounded-full" } absolute h-5 w-5 p-0.5 ${
305+ className = { `border ${
306+ noOfAnswers > 1 ? "rounded" : "rounded-full"
307+ } absolute h-5 w-5 p-0.5 ${
305308 showCorrectAnswer &&
306309 formik . values . options [ index ] ?. isAnswer
307310 ? "text-emerald-500 border-emerald-600"
0 commit comments