运行成功

This commit is contained in:
2026-01-13 20:29:51 +08:00
parent 192c63ea3f
commit 401e68ec8a
62 changed files with 5058 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
import { useState, useEffect, useMemo, useRef, type TouchEventHandler } from 'react';
import { Card, Button, Modal, message } from 'antd';
import { Card, Button, Modal, App } from 'antd';
import { useNavigate, useLocation } from 'react-router-dom';
import { useUser, useQuiz } from '../contexts';
import { quizAPI } from '../services/api';
@@ -19,8 +19,7 @@ interface Question {
answer: string | string[];
analysis?: string;
score: number;
createdAt: string;
category?: string;
category: string;
}
interface LocationState {
@@ -34,6 +33,7 @@ interface LocationState {
const QuizPage = () => {
const navigate = useNavigate();
const { message } = App.useApp();
const location = useLocation();
const { user } = useUser();
const { questions, setQuestions, currentQuestionIndex, setCurrentQuestionIndex, answers, setAnswer, setAnswers, clearQuiz } = useQuiz();