mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
removed redux completely
This commit is contained in:
parent
26e6d8d41b
commit
a4bb07e9cf
323 changed files with 2464 additions and 3348 deletions
|
@ -1,18 +1,21 @@
|
|||
import React, { FC } from "react";
|
||||
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 "~/containers/node/NodeComments";
|
||||
import { Footer } from "~/components/main/Footer";
|
||||
import { CommentContextProvider, useCommentContext } from "~/utils/context/CommentContextProvider";
|
||||
import { useUserContext } from "~/utils/context/UserContextProvider";
|
||||
import { useNodeContext } from "~/utils/context/NodeContextProvider";
|
||||
import React, { FC } from 'react';
|
||||
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 '~/containers/node/NodeComments';
|
||||
import { Footer } from '~/components/main/Footer';
|
||||
import { CommentContextProvider, useCommentContext } from '~/utils/context/CommentContextProvider';
|
||||
import { useUserContext } from '~/utils/context/UserContextProvider';
|
||||
import { useNodeContext } from '~/utils/context/NodeContextProvider';
|
||||
import { useAuth } from '~/hooks/auth/useAuth';
|
||||
|
||||
interface IProps {}
|
||||
|
||||
const BorisComments: FC<IProps> = () => {
|
||||
const user = useUserContext();
|
||||
const { isUser } = useAuth();
|
||||
|
||||
const {
|
||||
isLoading,
|
||||
comments,
|
||||
|
@ -27,9 +30,7 @@ const BorisComments: FC<IProps> = () => {
|
|||
return (
|
||||
<>
|
||||
<Group className={styles.grid}>
|
||||
{user.is_user && (
|
||||
<NodeCommentForm user={user} nodeId={node.id} saveComment={onSaveComment} />
|
||||
)}
|
||||
{isUser && <NodeCommentForm user={user} nodeId={node.id} saveComment={onSaveComment} />}
|
||||
|
||||
{isLoading ? (
|
||||
<NodeNoComments is_loading count={7} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue