From 5c1fb77776f0cf3647a7f43a0f5a6b254d2f97ad Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 8 Feb 2026 21:26:05 +0900
Subject: refactor(study): remove legacy card fallback and comments

All cards now use note-based template rendering. The legacy
front/back fallback path is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 src/client/pages/StudyPage.tsx | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

(limited to 'src/client/pages/StudyPage.tsx')

diff --git a/src/client/pages/StudyPage.tsx b/src/client/pages/StudyPage.tsx
index eccdb50..92d655e 100644
--- a/src/client/pages/StudyPage.tsx
+++ b/src/client/pages/StudyPage.tsx
@@ -188,23 +188,15 @@ function StudySession({ deckId }: { deckId: string }) {
 	const hasNoCards = cards.length === 0;
 	const remainingCards = cards.length - currentIndex;
 
-	// Compute rendered card content for both legacy and note-based cards
 	const cardContent = useMemo(() => {
 		if (!currentCard) return null;
 
-		// Note-based card: use template rendering
-		if (currentCard.noteType && currentCard.fieldValuesMap) {
-			const rendered = renderCard({
-				frontTemplate: currentCard.noteType.frontTemplate,
-				backTemplate: currentCard.noteType.backTemplate,
-				fieldValues: currentCard.fieldValuesMap,
-				isReversed: currentCard.isReversed ?? false,
-			});
-			return { front: rendered.front, back: rendered.back };
-		}
-
-		// Legacy card: use front/back directly
-		return { front: currentCard.front, back: currentCard.back };
+		return renderCard({
+			frontTemplate: currentCard.noteType.frontTemplate,
+			backTemplate: currentCard.noteType.backTemplate,
+			fieldValues: currentCard.fieldValuesMap,
+			isReversed: currentCard.isReversed ?? false,
+		});
 	}, [currentCard]);
 
 	return (
-- 
cgit v1.3-1-g0d28

