interface SimpleResultsProps { score: { correct: number; total: number } totalCards: number onRestart: () => void } export function QuizResult({ score, totalCards, onRestart }: SimpleResultsProps) { const accuracy = Math.round((score.correct / score.total) * 100) const getPerformanceMessage = () => { if (accuracy >= 80) return { text: '太棒了!', emoji: '🎉', color: 'text-green-600' } if (accuracy >= 60) return { text: '不錯!', emoji: '👍', color: 'text-blue-600' } if (accuracy >= 40) return { text: '繼續努力!', emoji: '💪', color: 'text-yellow-600' } return { text: '加油!', emoji: '🌟', color: 'text-orange-600' } } const performance = getPerformanceMessage() return (
{/* 完成慶祝 */}
{performance.emoji}

複習完成!

{performance.text}

{/* 詳細統計 */}
{totalCards}
總詞卡數
{score.correct}
答對數
{accuracy}%
準確率
{/* 鼓勵訊息 */}

{accuracy >= 80 ? "您對這些詞彙掌握得很好!繼續保持!" : accuracy >= 60 ? "表現不錯!多複習幾次會更熟練。" : "學習是個過程,多練習就會進步!"}

{/* 操作按鈕 */}
管理詞卡 回到主頁
) }