From 70115022700a24abfd7649b8697c71dacf09f470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=84=AD=E6=B2=9B=E8=BB=92?= Date: Thu, 25 Sep 2025 18:20:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=BE=A9ExtendedFlashcard?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=A1=9E=E5=9E=8B=E8=A1=9D=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 Omit 避免類型衝突 - 移除未使用的 isA1Learner import - 修復 nextReviewDate 可選屬性類型錯誤 編譯現在應該無錯誤,頁面可正常顯示 --- frontend/app/learn/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/learn/page.tsx b/frontend/app/learn/page.tsx index 09a0625..39f7d80 100644 --- a/frontend/app/learn/page.tsx +++ b/frontend/app/learn/page.tsx @@ -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 { userLevel?: number; // 學習者程度 (1-100) wordLevel?: number; // 詞彙難度 (1-100) - nextReviewDate?: string; // 下次復習日期 + nextReviewDate?: string; // 下次復習日期 (可選) currentInterval?: number; // 當前間隔天數 isOverdue?: boolean; // 是否逾期 overdueDays?: number; // 逾期天數