fix: increase current card top offset

This commit is contained in:
ittoview
2026-05-11 10:07:05 +01:00
parent ade0c6fd6b
commit 3a338fe059

View File

@@ -228,7 +228,7 @@ export default function ProcessPurposePracticePage() {
const deckTop = deck.getBoundingClientRect().top const deckTop = deck.getBoundingClientRect().top
const cardTop = currentCard.getBoundingClientRect().top const cardTop = currentCard.getBoundingClientRect().top
const targetTop = Math.max(deck.scrollTop + cardTop - deckTop - 32, 0) const targetTop = Math.max(deck.scrollTop + cardTop - deckTop - 90, 0)
currentScrollLimitRef.current = targetTop currentScrollLimitRef.current = targetTop
deck.scrollTo({ top: targetTop, behavior: 'smooth' }) deck.scrollTo({ top: targetTop, behavior: 'smooth' })
}) })