Skip to content

Commit

Permalink
fix: scroll to top on post page
Browse files Browse the repository at this point in the history
  • Loading branch information
ammar-ahmed22 committed Dec 13, 2024
1 parent 4fd5ec7 commit 32c4555
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/Post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const Post: React.FC = () => {
}
}, [data])

useEffect(() => {
window.scrollTo(0, 0)
}, [])
return (
<main className='relative transition min-h-screen'>
<div className='flex w-full justify-start mt-12'>
Expand Down

0 comments on commit 32c4555

Please sign in to comment.