Skip to content

Commit

Permalink
Merge branch 'feature/AB#19714' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefwint committed Jul 2, 2024
2 parents 39fde20 + c971d81 commit 4e3322f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ScrollToTop/ScrollToTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { useLocation } from 'react-router-dom'
* Function that can be called to bring the user's screen to the top of the page.
*/
export default function ScrollToTop() {
const { pathname } = useLocation()
const { pathname, key } = useLocation()

useEffect(() => {
window.scrollTo({
left: 0,
top: 0,
behavior: 'instant',
})
}, [pathname])
}, [pathname, key])

return null
}

0 comments on commit 4e3322f

Please sign in to comment.