From 1a4c5246359bef9af220fd2c561b7e24402286a7 Mon Sep 17 00:00:00 2001 From: ittoview Date: Mon, 11 May 2026 09:48:07 +0100 Subject: [PATCH] fix: adjust current card position --- src/pages/ProcessPurposePracticePage.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/ProcessPurposePracticePage.tsx b/src/pages/ProcessPurposePracticePage.tsx index 98d31f0..a48fea8 100644 --- a/src/pages/ProcessPurposePracticePage.tsx +++ b/src/pages/ProcessPurposePracticePage.tsx @@ -224,7 +224,8 @@ export default function ProcessPurposePracticePage() { if (!deck) return requestAnimationFrame(() => { - deck.scrollTo({ top: deck.scrollHeight, behavior: 'smooth' }) + const targetTop = Math.max(deck.scrollHeight - deck.clientHeight - 96, 0) + deck.scrollTo({ top: targetTop, behavior: 'smooth' }) }) }, [progress.currentIndex]) @@ -489,7 +490,7 @@ export default function ProcessPurposePracticePage() { isCurrent && correctFeedback ? 'border-green-300 shadow-lg shadow-green-100/70 ring-2 ring-green-100 dark:border-green-700 dark:shadow-none dark:ring-green-900/40' : isCurrent - ? 'border-blue-200 shadow-lg shadow-blue-100/70 ring-1 ring-blue-100 dark:border-blue-800 dark:shadow-none dark:ring-blue-900/30' + ? 'border-blue-200 shadow-xl shadow-blue-100/80 ring-2 ring-blue-100 dark:border-blue-800 dark:shadow-none dark:ring-blue-900/30' : 'border-gray-100 shadow-sm dark:border-gray-800' }`} > @@ -531,7 +532,7 @@ export default function ProcessPurposePracticePage() {

{item.purpose}