From 32c455534ccc72bf57dcf4cf11ef4747b4be4d25 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 13 Dec 2024 04:07:32 -0500 Subject: [PATCH] fix: scroll to top on post page --- src/pages/Post/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/Post/index.tsx b/src/pages/Post/index.tsx index 2797add..115be95 100644 --- a/src/pages/Post/index.tsx +++ b/src/pages/Post/index.tsx @@ -38,6 +38,9 @@ const Post: React.FC = () => { } }, [data]) + useEffect(() => { + window.scrollTo(0, 0) + }, []) return (