diff --git a/src/components/editors/ImageEditor/index.tsx b/src/components/editors/ImageEditor/index.tsx index 0c07d08c..fe0d2e67 100644 --- a/src/components/editors/ImageEditor/index.tsx +++ b/src/components/editors/ImageEditor/index.tsx @@ -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 mapDispatchToProps & { - data: INode; - pending_files: IUploadStatus[]; - setData: (val: INode) => void; - onFileMove: (o: number, n: number) => void; - onInputChange: ChangeEventHandler; - onDrop: DragEventHandler; -}; + data: INode; + pending_files: IUploadStatus[]; + + setData: (val: INode) => void; + onFileMove: (o: number, n: number) => void; + onInputChange: ChangeEventHandler; + onDrop: DragEventHandler; + }; const ImageEditorUnconnected: FC = ({ data, onFileMove, onInputChange, onDrop, - pending_files + pending_files, }) => ( = ({ - thumb, - id, - progress, - is_uploading, + thumb, id, progress, is_uploading, }) => (
- {thumb &&
{id}
} - {is_uploading &&
} + {thumb && ( +
+ )} + {is_uploading && ( +
+ +
+ )}
); diff --git a/src/components/upload/ImageUpload/styles.scss b/src/components/upload/ImageUpload/styles.scss index 9bc34400..52bd0d22 100644 --- a/src/components/upload/ImageUpload/styles.scss +++ b/src/components/upload/ImageUpload/styles.scss @@ -32,7 +32,7 @@ background: no-repeat 50% 50%; background-size: cover; opacity: 1; - filter: saturate(0); + // filter: saturate(0); } .progress { diff --git a/src/redux/node/reducer.ts b/src/redux/node/reducer.ts index 0b4f9e26..33f7ac30 100644 --- a/src/redux/node/reducer.ts +++ b/src/redux/node/reducer.ts @@ -16,22 +16,20 @@ const INITIAL_STATE: INodeState = { editor: { ...EMPTY_NODE, type: 'image', - blocks: [ - { ...EMPTY_BLOCK, type: 'image' }, - ], + blocks: [{ ...EMPTY_BLOCK, type: 'image' }], files: [ - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - { ...EMPTY_FILE, id: uuid() }, - ] + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + // { ...EMPTY_FILE, id: uuid() }, + ], }, is_loading: false, error: null,