mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-06-03 06:35:42 -05:00
Fix seasons page not scrolled to top on initial load
This commit is contained in:
parent
2b23ed434c
commit
da066fb4f4
|
|
@ -1,8 +1,12 @@
|
|||
import type { LoaderArgs, SerializeFrom } from "@remix-run/node";
|
||||
import {
|
||||
Link,
|
||||
useActionData,
|
||||
useFetcher,
|
||||
useFormAction,
|
||||
useLoaderData,
|
||||
useMatches,
|
||||
useNavigation,
|
||||
useSearchParams,
|
||||
} from "@remix-run/react";
|
||||
import clsx from "clsx";
|
||||
|
|
@ -572,6 +576,7 @@ function Matches() {
|
|||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
if (data.matches.currentPage === 1) return;
|
||||
ref.current?.scrollIntoView({
|
||||
block: "center",
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user