mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-02 16:16:41 +07:00
scroll to new comments from recent and notifications
This commit is contained in:
parent
5ef19f49c5
commit
0e4d2bf44d
8 changed files with 124 additions and 54 deletions
src/containers/node/NodeComments/components/Comment
|
@ -8,6 +8,7 @@ import { CommentWrapper } from '~/containers/comments/CommentWrapper';
|
|||
import { IComment, ICommentGroup, IFile } from '~/types';
|
||||
|
||||
import { CommendDeleted } from '../../../../../components/node/CommendDeleted';
|
||||
import { getCommentId } from '../../../../../constants/dom/links';
|
||||
|
||||
import { CommentContent } from './components/CommentContent';
|
||||
import { CommentDistance } from './components/CommentDistance';
|
||||
|
@ -83,18 +84,22 @@ const Comment: FC<Props> = memo(
|
|||
);
|
||||
|
||||
return (
|
||||
<CommentContent
|
||||
prefix={prefix}
|
||||
saveComment={saveComment}
|
||||
nodeId={nodeId}
|
||||
comment={comment}
|
||||
canEdit={!!canEdit}
|
||||
canLike={!!canLike}
|
||||
onLike={() => onLike(comment.id, !comment.liked)}
|
||||
onDelete={(val: boolean) => onDelete(comment.id, val)}
|
||||
onShowImageModal={onShowImageModal}
|
||||
key={comment.id}
|
||||
/>
|
||||
<>
|
||||
<a id={getCommentId(comment.id)} className={styles.anchor} />
|
||||
|
||||
<CommentContent
|
||||
prefix={prefix}
|
||||
saveComment={saveComment}
|
||||
nodeId={nodeId}
|
||||
comment={comment}
|
||||
canEdit={!!canEdit}
|
||||
canLike={!!canLike}
|
||||
onLike={() => onLike(comment.id, !comment.liked)}
|
||||
onDelete={(val: boolean) => onDelete(comment.id, val)}
|
||||
onShowImageModal={onShowImageModal}
|
||||
key={comment.id}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue