diff --git a/package.json b/package.json index ddd058ae..beea8443 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", + "@tippy.js/react": "^3.1.1", + "@types/react-router-dom": "^5.1.7", "autosize": "^4.0.2", "axios": "^0.21.1", "body-scroll-lock": "^2.6.4", @@ -29,6 +31,7 @@ "react-router-dom": "^5.1.2", "react-scripts": "3.4.4", "react-sortable-hoc": "^1.11", + "react-sticky-box": "^0.9.3", "redux": "^4.0.1", "redux-persist": "^5.10.0", "redux-saga": "^1.1.1", @@ -71,8 +74,8 @@ "@types/node": "^11.13.22", "@types/ramda": "^0.26.33", "@types/react-redux": "^7.1.11", - "@types/yup": "^0.29.11", "@types/swiper": "^5.4.2", + "@types/yup": "^0.29.11", "craco-alias": "^2.1.1", "craco-fast-refresh": "^1.0.2", "prettier": "^1.18.2" diff --git a/src/components/boris/BorisComments/index.tsx b/src/components/boris/BorisComments/index.tsx new file mode 100644 index 00000000..b4350c44 --- /dev/null +++ b/src/components/boris/BorisComments/index.tsx @@ -0,0 +1,40 @@ +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 '~/components/node/NodeComments'; +import { Footer } from '~/components/main/Footer'; +import { Card } from '~/components/containers/Card'; +import { useShallowSelect } from '~/utils/hooks/useShallowSelect'; +import { selectAuthUser } from '~/redux/auth/selectors'; +import { IComment, INode } from '~/redux/types'; + +interface IProps { + isLoadingComments: boolean; + commentCount: number; + node: INode; + comments: IComment[]; +} + +const BorisComments: FC = ({ isLoadingComments, node, commentCount, comments }) => { + const user = useShallowSelect(selectAuthUser); + + return ( + <> + + {user.is_user && } + + {isLoadingComments ? ( + + ) : ( + + )} + + +