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

fixed uploads

This commit is contained in:
muerwre 2019-08-20 18:25:33 +07:00
parent 38d56838f2
commit f511ca3f6a
4 changed files with 37 additions and 36 deletions

View file

@ -1,8 +1,4 @@
import React, {
FC,
ChangeEventHandler,
DragEventHandler
} from 'react';
import React, { FC, ChangeEventHandler, DragEventHandler } from 'react';
import { connect } from 'react-redux';
import { INode } from '~/redux/types';
import * as UPLOAD_ACTIONS from '~/redux/uploads/actions';
@ -12,25 +8,26 @@ import { IUploadStatus } from '~/redux/uploads/reducer';
const mapStateToProps = selectUploads;
const mapDispatchToProps = {
uploadUploadFiles: UPLOAD_ACTIONS.uploadUploadFiles
uploadUploadFiles: UPLOAD_ACTIONS.uploadUploadFiles,
};
type IProps = ReturnType<typeof mapStateToProps> &
typeof mapDispatchToProps & {
data: INode;
pending_files: IUploadStatus[];
setData: (val: INode) => void;
onFileMove: (o: number, n: number) => void;
onInputChange: ChangeEventHandler<HTMLInputElement>;
onDrop: DragEventHandler<HTMLFormElement>;
};
data: INode;
pending_files: IUploadStatus[];
setData: (val: INode) => void;
onFileMove: (o: number, n: number) => void;
onInputChange: ChangeEventHandler<HTMLInputElement>;
onDrop: DragEventHandler<HTMLFormElement>;
};
const ImageEditorUnconnected: FC<IProps> = ({
data,
onFileMove,
onInputChange,
onDrop,
pending_files
pending_files,
}) => (
<ImageGrid
onFileMove={onFileMove}