This commit is contained in:
Tom Heaton
2024-05-25 00:07:44 +01:00
parent af5a719496
commit 89a0532283
33 changed files with 8791 additions and 7983 deletions

11
src/components/ScrollToTop.jsx Executable file
View File

@@ -0,0 +1,11 @@
import {useEffect} from 'react'
import { useLocation } from 'react-router-dom'
export default function ScrollToTop() {
const {pathname} = useLocation()
useEffect(() => {
window.scrollTo(0,0)
}, [pathname])
return null;
}