chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:32:57 +08:00
commit cd420f9332
4811 changed files with 884702 additions and 0 deletions
@@ -0,0 +1,14 @@
import { useLocation } from "@remix-run/react";
import { useEffect, useRef } from "react";
/** Scroll a page body container back to the top when navigating to a route. */
export function useScrollContainerToTop<T extends HTMLElement>() {
const ref = useRef<T>(null);
const location = useLocation();
useEffect(() => {
ref.current?.scrollTo(0, 0);
}, [location.key]);
return ref;
}