fix: 修復ExtendedFlashcard接口類型衝突

- 使用 Omit<Flashcard, 'nextReviewDate'> 避免類型衝突
- 移除未使用的 isA1Learner import
- 修復 nextReviewDate 可選屬性類型錯誤

編譯現在應該無錯誤,頁面可正常顯示
This commit is contained in:
鄭沛軒 2025-09-25 18:20:58 +08:00
parent 31fb57861a
commit 7011502270
1 changed files with 3 additions and 3 deletions

View File

@ -9,13 +9,13 @@ import LearningComplete from '@/components/LearningComplete'
import ReviewTypeIndicator from '@/components/review/ReviewTypeIndicator'
import MasteryIndicator from '@/components/review/MasteryIndicator'
import { flashcardsService, type Flashcard } from '@/lib/services/flashcards'
import { calculateCurrentMastery, getReviewTypesByDifficulty, isA1Learner } from '@/lib/utils/masteryCalculator'
import { calculateCurrentMastery, getReviewTypesByDifficulty } from '@/lib/utils/masteryCalculator'
// 擴展的Flashcard接口包含智能複習需要的欄位
interface ExtendedFlashcard extends Flashcard {
interface ExtendedFlashcard extends Omit<Flashcard, 'nextReviewDate'> {
userLevel?: number; // 學習者程度 (1-100)
wordLevel?: number; // 詞彙難度 (1-100)
nextReviewDate?: string; // 下次復習日期
nextReviewDate?: string; // 下次復習日期 (可選)
currentInterval?: number; // 當前間隔天數
isOverdue?: boolean; // 是否逾期
overdueDays?: number; // 逾期天數