1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

boris: highlight announce comments

This commit is contained in:
Fedor Katurov 2023-03-18 16:34:47 +06:00
parent 2ecda12513
commit 6230a769e0
5 changed files with 41 additions and 18 deletions

View file

@ -2,6 +2,7 @@ import React, { FC, memo, useMemo } from 'react';
import { Comment } from '~/components/comment/Comment';
import { LoadMoreButton } from '~/components/input/LoadMoreButton';
import { ANNOUNCE_USER_ID, BORIS_NODE_ID } from '~/constants/boris/constants';
import { useGrouppedComments } from '~/hooks/node/useGrouppedComments';
import { ICommentGroup } from '~/types';
import { useCommentContext } from '~/utils/context/CommentContextProvider';
@ -64,6 +65,9 @@ const NodeComments: FC<IProps> = memo(({ order }) => {
nodeId={node.id!}
key={group.ids.join()}
group={group}
highlighted={
node.id === BORIS_NODE_ID && group.user.id === ANNOUNCE_USER_ID
}
canEdit={canEditComment(group, user)}
onDelete={onDeleteComment}
onShowImageModal={onShowImageModal}