fix: Add block: "start" to scrollIntoView options to ensure element aligns to the top of the viewport.
This commit is contained in:
parent
4565cff38b
commit
484be7fbd4
@ -60,7 +60,7 @@ export function GameList() {
|
|||||||
if (location.hash === "#existing-games") {
|
if (location.hash === "#existing-games") {
|
||||||
const el = document.getElementById("existing-games");
|
const el = document.getElementById("existing-games");
|
||||||
if (el) {
|
if (el) {
|
||||||
el.scrollIntoView({ behavior: "smooth" });
|
el.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [location]);
|
}, [location]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user