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

removed almost all node sagas

This commit is contained in:
Fedor Katurov 2022-01-02 20:44:41 +07:00
parent f76a5a4798
commit 168ba8cc04
30 changed files with 268 additions and 448 deletions

View file

@ -16,24 +16,28 @@ const BorisComments: FC<IProps> = () => {
const {
isLoading,
comments,
onSaveComment,
onLoadMoreComments,
onDeleteComment,
onShowImageModal,
count,
hasMore,
} = useCommentContext();
const { node } = useNodeContext();
return (
<>
<Group className={styles.grid}>
{user.is_user && <NodeCommentForm isBefore nodeId={node.id} />}
{user.is_user && (
<NodeCommentForm user={user} nodeId={node.id} saveComment={onSaveComment} />
)}
{isLoading ? (
<NodeNoComments is_loading count={7} />
) : (
<CommentContextProvider
onSaveComment={onSaveComment}
comments={comments}
count={count}
hasMore={hasMore}
onDeleteComment={onDeleteComment}
onLoadMoreComments={onLoadMoreComments}
onShowImageModal={onShowImageModal}