Skip to content

Commit

Permalink
Create Questions.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Ibrahim-Halil-Kuray committed Oct 29, 2023
1 parent 25d16bc commit 7cff313
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions 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<QuestionsProps> = ({ apiUrl }) => {
const [questions, setQuestions] = useState<Question[]>([]);
const [currentQuestionIndex, setCurrentQuestionIndex] = useState<number>(0);
const [userAnswers, setUserAnswers] = useState<number[]>([]);
const [isTimeUp, setIsTimeUp] = useState<boolean>(false);
const [isAnswered, setIsAnswered] = useState<boolean>(false);
const [timer, setTimer] = useState<number>(0);

return <div></div>;
};

export default Questions;

0 comments on commit 7cff313

Please sign in to comment.