mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-12 22:32:51 -05:00
Scroll to top when user ends up on error boundary
This commit is contained in:
parent
86730a31e4
commit
61ecc307b9
|
|
@ -23,6 +23,10 @@ export function Catcher() {
|
|||
const { revalidate } = useRevalidator();
|
||||
const location = useLocation();
|
||||
|
||||
React.useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, []);
|
||||
|
||||
// refresh user data to make sure it's up to date (e.g. cookie might have been removed, let's show the prompt to log back in)
|
||||
const hasRevalidated = React.useRef(false);
|
||||
React.useEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user