From 5353a4041615589ac57d0cd8ce1ebca49372211c Mon Sep 17 00:00:00 2001 From: streakingman Date: Thu, 13 Oct 2022 12:44:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=92=E8=A1=8C=E6=A6=9C=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E5=AE=9A=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Score.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Score.tsx b/src/components/Score.tsx index ca752d9..17f4ee1 100644 --- a/src/components/Score.tsx +++ b/src/components/Score.tsx @@ -97,7 +97,10 @@ const Score: FC<{ if (_userId) { setTimeout(() => { const rankEl = document.getElementById(_userId + 'el'); - rankEl?.scrollIntoView({ behavior: 'smooth' }); + rankEl?.scrollIntoView({ + behavior: 'smooth', + block: 'center', + }); }, 1000); } })