fix: 修復新複習頁面的 TypeScript 類型錯誤
- 在 CardState interface 中添加 difficultyLevelNumeric 屬性 - 確保與 reviewSimpleData 中的類型定義兼容 - 修復 QuizProgress 組件的類型匹配問題 - /review 頁面現在能正常編譯和運行 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a8562c3d48
commit
c3dafee6c3
|
|
@ -8,6 +8,7 @@ interface CardState extends Flashcard {
|
|||
isCompleted: boolean
|
||||
originalOrder: number
|
||||
synonyms?: string[]
|
||||
difficultyLevelNumeric: number // 添加缺少的屬性
|
||||
}
|
||||
|
||||
interface QuizItem {
|
||||
|
|
@ -96,7 +97,8 @@ const generateQuizItemsFromFlashcards = (flashcards: Flashcard[]): QuizItem[] =>
|
|||
wrongCount: 0,
|
||||
isCompleted: false,
|
||||
originalOrder: order / 2, // 原始詞卡的順序
|
||||
synonyms: []
|
||||
synonyms: [],
|
||||
difficultyLevelNumeric: card.masteryLevel || 1 // 添加缺少的屬性
|
||||
}
|
||||
|
||||
// 為每張詞卡生成兩種測驗模式
|
||||
|
|
|
|||
Loading…
Reference in New Issue