Web: Common: Layout: Refactoring.
This commit is contained in:
parent
4e7b414c03
commit
9c7936327a
@ -5,8 +5,8 @@ export default function ScrollToTop() {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
document.getElementById("customScrollBar") &&
|
||||
document.getElementById("customScrollBar").scrollTo(0, 0);
|
||||
const documentScrollElement = document.getElementById("customScrollBar");
|
||||
documentScrollElement && documentScrollElement.scrollTo(0, 0);
|
||||
}, [pathname]);
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user