'use client' import { Navigation } from '@/components/shared/Navigation' import { FlipMemory } from '@/components/review/quiz/FlipMemory' import { VocabChoiceQuiz } from '@/components/review/quiz/VocabChoiceQuiz' import { QuizProgress } from '@/components/review/ui/QuizProgress' import { QuizResult } from '@/components/review/quiz/QuizResult' import { SIMPLE_CARDS } from '@/lib/data/reviewSimpleData' import { useReviewSession } from '@/hooks/review/useReviewSession' export default function SimpleReviewPage() { // 使用重構後的 Hook 管理線性複習狀態 const { testItems, score, isComplete, currentTestItem, currentCard, vocabOptions, totalTestItems, completedTestItems, handleAnswer, handleSkip, handleRestart } = useReviewSession() // 顯示結果頁面 if (isComplete) { return (
{/* 線性測驗完成統計 */}

測驗統計

{completedTestItems}
完成測驗項目
{SIMPLE_CARDS.length}
練習詞卡數
{Math.round((score.correct / score.total) * 100)}%
正確率
) } // 主要線性測驗頁面 return (
{/* 使用修改後的 SimpleProgress 組件 */} {/* 根據當前測驗項目類型渲染對應組件 */} {currentTestItem && currentCard && ( <> {currentTestItem.testType === 'flip-card' && ( )} {currentTestItem.testType === 'vocab-choice' && ( )} )} {/* 控制按鈕 */}
) }