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

#34 made local comment form uploads

This commit is contained in:
Fedor Katurov 2021-02-27 17:51:12 +07:00
parent f45e34f330
commit 051b199d5d
14 changed files with 422 additions and 189 deletions

View file

@ -1,32 +1,25 @@
import React, { FC, useCallback, KeyboardEventHandler, useEffect, useMemo } from 'react';
import { Textarea } from '~/components/input/Textarea';
import React, { FC } from 'react';
import { CommentWrapper } from '~/components/containers/CommentWrapper';
import styles from './styles.module.scss';
import { Filler } from '~/components/containers/Filler';
import { Button } from '~/components/input/Button';
import { assocPath } from 'ramda';
import { InputHandler, IFileWithUUID, IFile } from '~/redux/types';
import { connect } from 'react-redux';
import * as NODE_ACTIONS from '~/redux/node/actions';
import { selectNode } from '~/redux/node/selectors';
import * as UPLOAD_ACTIONS from '~/redux/uploads/actions';
import { selectUploads } from '~/redux/uploads/selectors';
import { IState } from '~/redux/store';
import { selectUser, selectAuthUser } from '~/redux/auth/selectors';
import { selectAuthUser } from '~/redux/auth/selectors';
import { CommentForm } from '../../comment/CommentForm';
import { LocalCommentForm } from '~/components/comment/LocalCommentForm';
import { INode } from '~/redux/types';
const mapStateToProps = state => ({
user: selectAuthUser(state),
});
type IProps = ReturnType<typeof mapStateToProps> & {
is_before?: boolean;
isBefore?: boolean;
nodeId: INode['id'];
};
const NodeCommentFormUnconnected: FC<IProps> = ({ user, is_before }) => {
const NodeCommentFormUnconnected: FC<IProps> = ({ user, isBefore, nodeId }) => {
return (
<CommentWrapper user={user}>
<CommentForm id={0} is_before={is_before} />
<CommentForm id={0} is_before={isBefore} />
<LocalCommentForm isBefore={isBefore} nodeId={nodeId} />
</CommentWrapper>
);
};