fix: 排行榜滚动定位

This commit is contained in:
streakingman 2022-10-13 12:44:47 +08:00
parent fd1d429f59
commit 5353a40416

View File

@ -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);
}
})