fix: Add block: "start" to scrollIntoView options to ensure element aligns to the top of the viewport.

This commit is contained in:
code002lover 2025-12-05 15:03:26 +01:00
parent 4565cff38b
commit 484be7fbd4

View File

@ -60,7 +60,7 @@ export function GameList() {
if (location.hash === "#existing-games") {
const el = document.getElementById("existing-games");
if (el) {
el.scrollIntoView({ behavior: "smooth" });
el.scrollIntoView({ behavior: "smooth", block: "start" });
}
}
}, [location]);