fix retain scroll position in catalog view

This commit is contained in:
Tom
2023-05-15 17:17:36 +02:00
parent f0b8d48078
commit a122e6d15d
3 changed files with 9 additions and 3 deletions
+6
View File
@@ -73,6 +73,12 @@ const Thread = () => {
const commentMediaInfo = getCommentMediaInfo(comment);
const fallbackImgUrl = "assets/filedeleted-res.gif";
useEffect(() => {
window.scrollTo(0, 0);
}, []);
useEffect(() => {
if ( comment.state === "failed" && selectedAddress === undefined) {
navigate('/404');