From 06d79d8d77ba49b186cd31fd9c7fda65a77d89fd Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 28 Oct 2023 21:37:04 +0200 Subject: [PATCH] fix(comments): wrong useeffect logic --- src/components/views/comments/comments.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/comments/comments.tsx b/src/components/views/comments/comments.tsx index 948d99f0..5fec24e9 100644 --- a/src/components/views/comments/comments.tsx +++ b/src/components/views/comments/comments.tsx @@ -23,9 +23,12 @@ const Comments: FC = () => { } else { document.title = 'seedit'; } - window.scrollTo(0, 0); }, [threadTitle, subplebbitTitle]); + useEffect(() => { + window.scrollTo(0, 0); + }, []); + return (