scrollTop on Url Location change
This commit is contained in:
parent
3cacc87a8f
commit
d8fd374b12
|
|
@ -21,6 +21,10 @@ import React, { useEffect, useRef } from "react";
|
||||||
function App() {
|
function App() {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}, [location]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <button onClick={playAnimation}>qsdqsd</button> */}
|
{/* <button onClick={playAnimation}>qsdqsd</button> */}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user