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

added user context

This commit is contained in:
Fedor Katurov 2021-11-19 16:34:09 +07:00
parent f631f79654
commit e881512f63
13 changed files with 116 additions and 160 deletions

View file

@ -3,10 +3,11 @@ import styles from './styles.module.scss';
import { Group } from '~/components/containers/Group';
import { NodeCommentForm } from '~/components/node/NodeCommentForm';
import { NodeNoComments } from '~/components/node/NodeNoComments';
import { NodeComments } from '~/components/node/NodeComments';
import { NodeComments } from '~/views/node/NodeComments';
import { Footer } from '~/components/main/Footer';
import { IComment, IFile, INode } from '~/redux/types';
import { IUser } from '~/redux/auth/types';
import { CommentProvider } from '~/utils/providers/CommentProvider';
interface IProps {
node: INode;
@ -37,15 +38,16 @@ const BorisComments: FC<IProps> = ({
{isLoadingComments ? (
<NodeNoComments is_loading count={7} />
) : (
<NodeComments
<CommentProvider
comments={comments}
count={commentCount}
user={user}
order="ASC"
onDeleteComment={onDeleteComment}
onLoadMoreComments={onLoadMoreComments}
onShowImageModal={onShowImageModal}
/>
isLoadingComments={isLoadingComments}
>
<NodeComments order="ASC" />
</CommentProvider>
)}
</Group>