diff --git a/src/components/Questions.tsx b/src/components/Questions.tsx new file mode 100644 index 0000000..ea2390c --- /dev/null +++ b/src/components/Questions.tsx @@ -0,0 +1,25 @@ +import React, { useState, useEffect } from 'react'; + +interface QuestionsProps { + apiUrl: string; // get data from backend +} + +interface Question { + question: string; + options: string[]; + correct_answer: number; + explanation: string; +} + +const Questions: React.FC = ({ apiUrl }) => { + const [questions, setQuestions] = useState([]); + const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0); + const [userAnswers, setUserAnswers] = useState([]); + const [isTimeUp, setIsTimeUp] = useState(false); + const [isAnswered, setIsAnswered] = useState(false); + const [timer, setTimer] = useState(0); + + return
; +}; + +export default Questions;