1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

fixed boris comments

This commit is contained in:
Fedor Katurov 2019-12-02 15:49:09 +07:00
parent 0e4c1acc3f
commit 5cb0791752
7 changed files with 163 additions and 90 deletions

View file

@ -18,9 +18,7 @@ import { selectUploads } from '~/redux/uploads/selectors';
import { IState } from '~/redux/store';
import { getFileType } from '~/utils/uploader';
import { selectUser } from '~/redux/auth/selectors';
import { getURL } from '~/utils/dom';
import { ButtonGroup } from '~/components/input/ButtonGroup';
import { AudioPlayer } from '~/components/media/AudioPlayer';
import { SortableImageGrid } from '~/components/editors/SortableImageGrid';
import { moveArrItem } from '~/utils/fn';
import { SortEnd } from 'react-sortable-hoc';
@ -41,6 +39,7 @@ const mapDispatchToProps = {
type IProps = ReturnType<typeof mapStateToProps> &
typeof mapDispatchToProps & {
id: number;
is_before?: boolean;
};
const CommentFormUnconnected: FC<IProps> = ({
@ -48,6 +47,7 @@ const CommentFormUnconnected: FC<IProps> = ({
uploads: { statuses, files },
user,
id,
is_before = false,
nodePostComment,
nodeSetCommentData,
uploadUploadFiles,
@ -89,9 +89,9 @@ const CommentFormUnconnected: FC<IProps> = ({
const onSubmit = useCallback(
event => {
if (event) event.preventDefault();
nodePostComment(id);
nodePostComment(id, is_before);
},
[nodePostComment, id]
[nodePostComment, id, is_before]
);
const onKeyDown = useCallback<KeyboardEventHandler<HTMLTextAreaElement>>(