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,20 +1,21 @@
|
|||
import React, { FC } from "react";
|
||||
import { NodeDeletedBadge } from "~/components/node/NodeDeletedBadge";
|
||||
import { Group } from "~/components/containers/Group";
|
||||
import { Padder } from "~/components/containers/Padder";
|
||||
import { NodeCommentForm } from "~/components/node/NodeCommentForm";
|
||||
import { NodeRelatedBlock } from "~/components/node/NodeRelatedBlock";
|
||||
import { useNodeBlocks } from "~/hooks/node/useNodeBlocks";
|
||||
import { NodeTagsBlock } from "~/components/node/NodeTagsBlock";
|
||||
import StickyBox from "react-sticky-box";
|
||||
import styles from "./styles.module.scss";
|
||||
import { NodeAuthorBlock } from "~/components/node/NodeAuthorBlock";
|
||||
import { useNodeContext } from "~/utils/context/NodeContextProvider";
|
||||
import { useCommentContext } from "~/utils/context/CommentContextProvider";
|
||||
import { NodeNoComments } from "~/components/node/NodeNoComments";
|
||||
import { NodeComments } from "~/containers/node/NodeComments";
|
||||
import { useUserContext } from "~/utils/context/UserContextProvider";
|
||||
import { useNodeRelatedContext } from "~/utils/context/NodeRelatedContextProvider";
|
||||
import React, { FC } from 'react';
|
||||
import { NodeDeletedBadge } from '~/components/node/NodeDeletedBadge';
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { Padder } from '~/components/containers/Padder';
|
||||
import { NodeCommentForm } from '~/components/node/NodeCommentForm';
|
||||
import { NodeRelatedBlock } from '~/components/node/NodeRelatedBlock';
|
||||
import { useNodeBlocks } from '~/hooks/node/useNodeBlocks';
|
||||
import { NodeTagsBlock } from '~/components/node/NodeTagsBlock';
|
||||
import StickyBox from 'react-sticky-box';
|
||||
import styles from './styles.module.scss';
|
||||
import { NodeAuthorBlock } from '~/components/node/NodeAuthorBlock';
|
||||
import { useNodeContext } from '~/utils/context/NodeContextProvider';
|
||||
import { useCommentContext } from '~/utils/context/CommentContextProvider';
|
||||
import { NodeNoComments } from '~/components/node/NodeNoComments';
|
||||
import { NodeComments } from '~/containers/node/NodeComments';
|
||||
import { useUserContext } from '~/utils/context/UserContextProvider';
|
||||
import { useNodeRelatedContext } from '~/utils/context/NodeRelatedContextProvider';
|
||||
import { useAuthProvider } from '~/utils/providers/AuthProvider';
|
||||
|
||||
interface IProps {
|
||||
commentsOrder: 'ASC' | 'DESC';
|
||||
|
@ -26,6 +27,7 @@ const NodeBottomBlock: FC<IProps> = ({ commentsOrder }) => {
|
|||
const { comments, isLoading: isLoadingComments, onSaveComment } = useCommentContext();
|
||||
const { related, isLoading: isLoadingRelated } = useNodeRelatedContext();
|
||||
const { inline } = useNodeBlocks(node, isLoading);
|
||||
const { isUser } = useAuthProvider();
|
||||
|
||||
if (node.deleted_at) {
|
||||
return <NodeDeletedBadge />;
|
||||
|
@ -44,7 +46,7 @@ const NodeBottomBlock: FC<IProps> = ({ commentsOrder }) => {
|
|||
<NodeComments order={commentsOrder} />
|
||||
)}
|
||||
|
||||
{user.is_user && !isLoading && (
|
||||
{isUser && !isLoading && (
|
||||
<NodeCommentForm nodeId={node.id} saveComment={onSaveComment} user={user} />
|
||||
)}
|
||||
</Group>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue