From 42f8f96e345ac81500e7c9f1ec719e08e92c854d Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Sun, 26 Jan 2025 19:01:42 +0700 Subject: [PATCH] only use new-comment tag if there's really new comment --- src/components/common/NodeHorizontalCard/index.tsx | 6 +++++- src/components/notifications/NotificationComment/index.tsx | 2 +- src/containers/node/NodeComments/index.tsx | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/common/NodeHorizontalCard/index.tsx b/src/components/common/NodeHorizontalCard/index.tsx index d132ee90..309110ea 100644 --- a/src/components/common/NodeHorizontalCard/index.tsx +++ b/src/components/common/NodeHorizontalCard/index.tsx @@ -22,7 +22,11 @@ const NodeHorizontalCard: FC = ({ node, hasNew, onClick }) => (
= ({ item, isNew }) => (
diff --git a/src/containers/node/NodeComments/index.tsx b/src/containers/node/NodeComments/index.tsx index 71c3a547..816f6d19 100644 --- a/src/containers/node/NodeComments/index.tsx +++ b/src/containers/node/NodeComments/index.tsx @@ -68,6 +68,7 @@ const NodeComments: FC = observer(({ order }) => { return null; } + /** Scrolls down to new comments or specific one from anchor */ useEffect(() => { const anchor = location.hash?.replace('#', '');