Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rain1024 committed Oct 6, 2024
1 parent 6f017d1 commit ec0ca43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/languagesv2/languages-v2-web/src/pages/Quiz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import '../App.css';
import { FaCheckCircle, FaTimesCircle } from 'react-icons/fa';
import questions from './quiz/QuizData';

type LanguageType = 'English' | 'Vietnamese' | 'Chinese'; // Add all the possible languages here

function Quiz() {
const { search } = useLocation();
const params = new URLSearchParams(search);
const language = params.get('language') || 'English';
const language = (params.get('language') || 'English') as LanguageType;
const [currentQuestion, setCurrentQuestion] = useState(0);
const [showScore, setShowScore] = useState(false);
const [score, setScore] = useState(0);
Expand Down

0 comments on commit ec0ca43

Please sign in to comment.