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

added dropzones for comments and node editors

This commit is contained in:
Fedor Katurov 2021-10-05 11:31:21 +07:00
parent fb8ad315c0
commit f10a1fa2d8
23 changed files with 247 additions and 41 deletions

View file

@ -5,7 +5,7 @@ import { SortableAudioGrid } from '~/components/editors/SortableAudioGrid';
import { IFile } from '~/redux/types';
import { SortEnd } from 'react-sortable-hoc';
import { moveArrItem } from '~/utils/fn';
import { useDropZone } from '~/utils/hooks';
import { useFileDropZone } from '~/utils/hooks';
import { COMMENT_FILE_TYPES, UPLOAD_TYPES } from '~/redux/uploads/constants';
import { useFileUploaderContext } from '~/utils/hooks/useFileUploader';
@ -29,7 +29,7 @@ const CommentFormAttaches: FC = () => {
pending,
]);
const onDrop = useDropZone(uploadFiles, COMMENT_FILE_TYPES);
const onDrop = useFileDropZone(uploadFiles, COMMENT_FILE_TYPES);
const hasImageAttaches = images.length > 0 || pendingImages.length > 0;
const hasAudioAttaches = audios.length > 0 || pendingAudios.length > 0;