diff --git a/.eslintrc.js b/.eslintrc.js index 4a82f923..dd724fe8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,5 @@ module.exports = { - extends: ['airbnb', 'airbnb-base', 'prettier/@typescript-eslint', 'plugin:@typescript-eslint/recommended'], - // "parser": "babel-eslint", + extends: ['plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint', 'airbnb', 'airbnb-base'], parser: '@typescript-eslint/parser', parserOptions: { ecmaFeatures: { @@ -11,15 +10,12 @@ module.exports = { plugins: ['@typescript-eslint', 'react', 'jsx-a11y', 'import', 'react-hooks'], settings: { 'import/resolver': { - // node: { - // extensions: ['.js', '.jsx', '.ts', '.tsx'], - // }, typescript: {}, }, }, rules: { '@typescript-eslint/explicit-function-return-type': 0, - '@typescript-eslint/indent': ['warn', 2], + // '@typescript-eslint/indent': ['warn', 2], 'comma-dangle': 0, 'no-restricted-syntax': 1, 'react/prop-types': 0, @@ -63,5 +59,6 @@ module.exports = { window: false, HTMLInputElement: false, HTMLDivElement: false, + FormData: false, }, }; diff --git a/src/components/editors/ImageEditor/index.tsx b/src/components/editors/ImageEditor/index.tsx index 00eed88f..73e578d1 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, }) => ( = ({ @@ -16,14 +18,22 @@ const Cell: FC = ({ height = 1, title, is_hero, + is_text = (Math.random() > 0.8), }) => (
+ {is_text &&
{TEXTS.LOREM_IPSUM}
} { title &&
{title}
}
); diff --git a/src/components/flow/Cell/styles.scss b/src/components/flow/Cell/styles.scss index 64b8df26..38165284 100644 --- a/src/components/flow/Cell/styles.scss +++ b/src/components/flow/Cell/styles.scss @@ -6,6 +6,7 @@ background: $cell_bg; border-radius: $cell_radius; position: relative; + overflow: hidden; &:global(.is_hero) { .title { @@ -16,6 +17,16 @@ @include outer_shadow(); } +.text { + line-height: 1.6em; + font-size: 18px; + font: $font_18_regular; + position: absolute; + top: 0; + left: 0; + padding: $gap; +} + .title { font: $font_cell_title; @@ -49,4 +60,10 @@ .hor-2 { grid-column-end: span 2; } + + .is_text { + background: none; + padding: 10px; + box-shadow: inset #444 0 0 0 1px; + } } diff --git a/src/components/flow/TestGrid/index.tsx b/src/components/flow/TestGrid/index.tsx index 62546cc5..3439ca7b 100644 --- a/src/components/flow/TestGrid/index.tsx +++ b/src/components/flow/TestGrid/index.tsx @@ -6,31 +6,10 @@ import * as styles from './styles.scss'; export const TestGrid = () => (
-
- HERO -
-
-
- STAMP -
+
HERO
+ +
STAMP
{range(1, 20).map(el => ( = ({ username, is_user, showDialog }) => { const onOpenEditor = useCallback(() => showDialog(DIALOGS.EDITOR), [showDialog]); return ( -
+
diff --git a/src/components/main/Header/style.scss b/src/components/main/Header/style.scss index 3cdbe687..2e96d1da 100644 --- a/src/components/main/Header/style.scss +++ b/src/components/main/Header/style.scss @@ -4,6 +4,7 @@ justify-content: flex-end; font-weight: 500; height: 96px; + margin-top: -20px; } .spacer { diff --git a/src/components/upload/ImageUpload/index.tsx b/src/components/upload/ImageUpload/index.tsx index d8a85a51..e157332b 100644 --- a/src/components/upload/ImageUpload/index.tsx +++ b/src/components/upload/ImageUpload/index.tsx @@ -12,15 +12,21 @@ interface IProps { } const ImageUpload: FC = ({ - 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/constants/api.ts b/src/constants/api.ts index 501fd82a..064898bc 100644 --- a/src/constants/api.ts +++ b/src/constants/api.ts @@ -3,5 +3,6 @@ export const API = { USER: { LOGIN: '/auth/login', ME: '/auth/me', // - } + UPLOAD: (target, type) => `/upload/${target}/${type}`, + }, }; diff --git a/src/constants/texts.ts b/src/constants/texts.ts new file mode 100644 index 00000000..fbe35a31 --- /dev/null +++ b/src/constants/texts.ts @@ -0,0 +1,4 @@ +export const TEXTS = { + LOREM_IPSUM: + 'Многие думают, что Lorem Ipsum - взятый с потолка псевдо-латинский набор слов, но это не совсем так. Его корни уходят в один фрагмент классической латыни 45 года н.э., то есть более двух тысячелетий назад. Ричард МакКлинток, профессор латыни из колледжа Hampden-Sydney, штат Вирджиния, взял одно из самых странных слов в Lorem Ipsum, "consectetur", и занялся его поисками в классической латинской литературе. В результате он нашёл неоспоримый первоисточник Lorem Ipsum в разделах 1.10.32 и 1.10.33 книги "de Finibus Bonorum et Malorum" ("О пределах добра и зла"), написанной Цицероном в 45 году н.э. Этот трактат по теории этики был очень популярен в эпоху Возрождения. Первая строка Lorem Ipsum, "Lorem ipsum dolor sit amet..", происходит от одной из строк в разделе 1.10.32', +}; diff --git a/src/containers/App.tsx b/src/containers/App.tsx index 1f65381e..68b6b4fe 100644 --- a/src/containers/App.tsx +++ b/src/containers/App.tsx @@ -1,11 +1,8 @@ -import * as React from 'react'; +import React, { FC } from 'react'; import { connect } from 'react-redux'; -import { bindActionCreators } from 'redux'; import { hot } from 'react-hot-loader'; import { ConnectedRouter } from 'connected-react-router'; -import { - NavLink, Switch, Route, Redirect -} from 'react-router-dom'; +import { Switch, Route, Redirect } from 'react-router-dom'; import { history } from '~/redux/store'; import { FlowLayout } from '~/containers/flow/FlowLayout'; import { MainLayout } from '~/containers/main/MainLayout'; @@ -23,29 +20,28 @@ const mapDispatchToProps = {}; type IProps = typeof mapDispatchToProps & ReturnType & {}; -class Component extends React.Component { - render() { - return ( - - - - - +const Component: FC = ({ is_shown }) => ( + + + + - - - - - + + - - - - - - ); - } -} + + + + + + + + + + + + +); export default connect( mapStateToProps, diff --git a/src/containers/dialogs/EditorDialog/index.tsx b/src/containers/dialogs/EditorDialog/index.tsx index 0edbbae3..71f2117a 100644 --- a/src/containers/dialogs/EditorDialog/index.tsx +++ b/src/containers/dialogs/EditorDialog/index.tsx @@ -1,5 +1,5 @@ import React, { - FC, useState, useCallback, useEffect + FC, useState, useCallback, useEffect, } from 'react'; import { connect } from 'react-redux'; import assocPath from 'ramda/es/assocPath'; @@ -20,6 +20,7 @@ import { moveArrItem } from '~/utils/fn'; import { IFile, IFileWithUUID } from '~/redux/types'; import * as UPLOAD_ACTIONS from '~/redux/uploads/actions'; import { selectUploads } from '~/redux/uploads/selectors'; +import { UPLOAD_TARGETS, UPLOAD_TYPES, UPLOAD_SUBJECTS } from '~/redux/uploads/constants'; const mapStateToProps = (state) => { const { editor } = selectNode(state); @@ -35,19 +36,29 @@ const mapDispatchToProps = { type IProps = IDialogProps & ReturnType & typeof mapDispatchToProps & {}; const EditorDialogUnconnected: FC = ({ - onRequestClose, editor, uploadUploadFiles, files, statuses + onRequestClose, + editor, + uploadUploadFiles, + files, + statuses, }) => { const [data, setData] = useState(editor); const eventPreventer = useCallback(event => event.preventDefault(), []); const [temp, setTemp] = useState([]); - const onFileMove = useCallback((old_index: number, new_index: number) => { - setData(assocPath(['files'], moveArrItem(old_index, new_index, data.files), data)); - }, [data, setData]); + const onFileMove = useCallback( + (old_index: number, new_index: number) => { + setData(assocPath(['files'], moveArrItem(old_index, new_index, data.files), data)); + }, + [data, setData] + ); - const onFileAdd = useCallback((file: IFile) => { - setData(assocPath(['files'], append(file, data.files), data)); - }, [data, setData]); + const onFileAdd = useCallback( + (file: IFile) => { + setData(assocPath(['files'], append(file, data.files), data)); + }, + [data, setData] + ); const onDrop = useCallback( (event: React.DragEvent) => { @@ -59,7 +70,9 @@ const EditorDialogUnconnected: FC = ({ (file: File): IFileWithUUID => ({ file, temp_id: uuid(), - subject: 'editor' + subject: UPLOAD_SUBJECTS.EDITOR, + target: UPLOAD_TARGETS.NODES, + type: UPLOAD_TYPES.IMAGE, }) ); @@ -81,7 +94,9 @@ const EditorDialogUnconnected: FC = ({ (file: File): IFileWithUUID => ({ file, temp_id: uuid(), - subject: 'editor' + subject: UPLOAD_SUBJECTS.EDITOR, + target: UPLOAD_TARGETS.NODES, + type: UPLOAD_TYPES.IMAGE, }) ); @@ -124,11 +139,7 @@ const EditorDialogUnconnected: FC = ({ const buttons = ( - + diff --git a/src/containers/examples/ImageExample/index.tsx b/src/containers/examples/ImageExample/index.tsx index 500f3188..db13af26 100644 --- a/src/containers/examples/ImageExample/index.tsx +++ b/src/containers/examples/ImageExample/index.tsx @@ -10,17 +10,16 @@ import { NodeRelated } from '~/components/node/NodeRelated'; import { Tags } from '~/components/node/Tags'; import { MenuButton } from '~/components/node/MenuButton'; import { NodeNoComments } from '~/components/node/NodeNoComments'; -import { InputText } from '~/components/input/InputText'; interface IProps {} const ImageExample: FC = () => ( -
@@ -41,11 +40,7 @@ const ImageExample: FC = () => ( - + @@ -59,7 +54,7 @@ const ImageExample: FC = () => ( { title: 'Плейлист', feature: 'green' }, { title: 'Просто' }, { title: '+ фото', feature: 'black' }, - { title: '+ с музыкой', feature: 'black' } + { title: '+ с музыкой', feature: 'black' }, ]} /> diff --git a/src/containers/flow/FlowLayout/index.tsx b/src/containers/flow/FlowLayout/index.tsx index fff9250e..71f89f4d 100644 --- a/src/containers/flow/FlowLayout/index.tsx +++ b/src/containers/flow/FlowLayout/index.tsx @@ -1,8 +1,11 @@ import * as React from 'react'; import { TestGrid } from '~/components/flow/TestGrid'; +import * as styles from './styles.scss'; +import { Header } from '~/components/main/Header'; export const FlowLayout = () => ( -
+
+
); diff --git a/src/containers/flow/FlowLayout/styles.scss b/src/containers/flow/FlowLayout/styles.scss new file mode 100644 index 00000000..d2dd77c6 --- /dev/null +++ b/src/containers/flow/FlowLayout/styles.scss @@ -0,0 +1,6 @@ +.wrap { + max-width: 2000px; + padding: 0 40px 40px 40px; + display: flex; + flex-direction: column; +} diff --git a/src/redux/auth/sagas.ts b/src/redux/auth/sagas.ts index 83149cfd..ff5d751c 100644 --- a/src/redux/auth/sagas.ts +++ b/src/redux/auth/sagas.ts @@ -1,5 +1,5 @@ import { - call, put, takeLatest, select + call, put, takeLatest, select, } from 'redux-saga/effects'; import { SagaIterator } from 'redux-saga'; import { push } from 'connected-react-router'; @@ -15,10 +15,14 @@ import { IResultWithStatus } from '../types'; import { IUser } from './types'; export function* reqWrapper(requestAction, props = {}): ReturnType { - const { access } = yield select(selectToken); + const access = yield select(selectToken); + + console.log('firing reqWrapper'); const result = yield call(requestAction, { access, ...props }); + console.log('at reqWrapper', { result }); + if (result && result.status === 401) { yield put(push(URLS.BASE)); yield put(modalShowDialog(DIALOGS.LOGIN)); @@ -26,15 +30,29 @@ export function* reqWrapper(requestAction, props = {}): ReturnType) { +function* sendLoginRequestSaga({ + username, + password, +}: ReturnType) { if (!username || !password) return; - const { error, data: { token, user } }: IResultWithStatus<{ token: string; user: IUser }> = yield call(apiUserLogin, { username, password }); + const { + error, + data: { token, user }, + }: IResultWithStatus<{ token: string; user: IUser }> = yield call(apiUserLogin, { + username, + password, + }); - if (error) { yield put(userSetLoginError(error)); return; } + if (error) { + yield put(userSetLoginError(error)); + return; + } yield put(authSetToken(token)); yield put(authSetUser({ ...user, is_user: true })); diff --git a/src/redux/node/reducer.ts b/src/redux/node/reducer.ts index 0b4f9e26..8841d404 100644 --- a/src/redux/node/reducer.ts +++ b/src/redux/node/reducer.ts @@ -16,22 +16,8 @@ const INITIAL_STATE: INodeState = { editor: { ...EMPTY_NODE, 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() }, - ] + blocks: [{ ...EMPTY_BLOCK, type: 'image' }], + files: [], }, is_loading: false, error: null, diff --git a/src/redux/types.ts b/src/redux/types.ts index b04ebb82..e9589ea5 100644 --- a/src/redux/types.ts +++ b/src/redux/types.ts @@ -7,8 +7,8 @@ export interface ITag { } export type IInputTextProps = DetailedHTMLProps< -InputHTMLAttributes, -HTMLInputElement + InputHTMLAttributes, + HTMLInputElement > & { wrapperClassName?: string; handler?: (value: string) => void; @@ -46,6 +46,8 @@ export interface IResultWithStatus { export type UUID = string; +export type IUploadType = 'image' | 'text' | 'audio' | 'video' | 'other'; + export interface IFile { id?: UUID; temp_id?: UUID; @@ -58,7 +60,7 @@ export interface IFile { url: string; size: number; - type: 'image' | 'text' | 'audio' | 'video'; + type: IUploadType; mime: string; createdAt?: string; @@ -68,7 +70,9 @@ export interface IFile { export interface IFileWithUUID { temp_id?: UUID; file: File; - subject: string; + subject?: string; + target: string; + type: string; } export interface IBlock { @@ -107,3 +111,5 @@ export interface INode { createdAt?: string; updatedAt?: string; } + +export type IUploadProgressHandler = (current: number, total: number) => void; diff --git a/src/redux/uploads/actions.ts b/src/redux/uploads/actions.ts index aa3e4419..75545669 100644 --- a/src/redux/uploads/actions.ts +++ b/src/redux/uploads/actions.ts @@ -4,27 +4,27 @@ import { IUploadStatus } from './reducer'; export const uploadUploadFiles = (files: IFileWithUUID[]) => ({ files, - type: UPLOAD_ACTIONS.UPLOAD_FILES + type: UPLOAD_ACTIONS.UPLOAD_FILES, }); export const uploadAddStatus = (temp_id: UUID, status?: Partial) => ({ temp_id, status, - type: UPLOAD_ACTIONS.ADD_STATUS + type: UPLOAD_ACTIONS.ADD_STATUS, }); export const uploadAddFile = (file: IFile) => ({ file, - type: UPLOAD_ACTIONS.ADD_FILE + type: UPLOAD_ACTIONS.ADD_FILE, }); export const uploadSetStatus = (temp_id: UUID, status?: Partial) => ({ temp_id, status, - type: UPLOAD_ACTIONS.SET_STATUS + type: UPLOAD_ACTIONS.SET_STATUS, }); export const uploadDropStatus = (temp_id: UUID) => ({ temp_id, - type: UPLOAD_ACTIONS.DROP_STATUS + type: UPLOAD_ACTIONS.DROP_STATUS, }); diff --git a/src/redux/uploads/api.ts b/src/redux/uploads/api.ts new file mode 100644 index 00000000..a5c7aa23 --- /dev/null +++ b/src/redux/uploads/api.ts @@ -0,0 +1,20 @@ +import { + IResultWithStatus, IFile, IUploadProgressHandler, IFileWithUUID, +} from '~/redux/types'; +import { api, configWithToken } from '~/utils/api'; +import { API } from '~/constants/api'; + +export const postUploadFile = ({ + access, + file, + target = 'others', + type = 'image', +}: IFileWithUUID & { + access: string; + onProgress: IUploadProgressHandler; +}): Promise> => { + const data = new FormData(); + data.append('file', file); + + return api.post(API.USER.UPLOAD(target, type), data, configWithToken(access)); +}; diff --git a/src/redux/uploads/constants.ts b/src/redux/uploads/constants.ts index 2cea0fcc..9bebc9bf 100644 --- a/src/redux/uploads/constants.ts +++ b/src/redux/uploads/constants.ts @@ -1,4 +1,4 @@ -import { IFile } from '~/redux/types'; +import { IFile, IUploadType } from '~/redux/types'; import { IUploadState, IUploadStatus } from './reducer'; const prefix = 'UPLOAD.'; @@ -11,7 +11,7 @@ export const UPLOAD_ACTIONS = { DROP_STATUS: `${prefix}DROP_STATUS`, SET_STATUS: `${prefix}SET_STATUS`, - ADD_FILE: `${prefix}ADD_FILE` + ADD_FILE: `${prefix}ADD_FILE`, }; export const EMPTY_FILE: IFile = { @@ -25,7 +25,7 @@ export const EMPTY_FILE: IFile = { url: 'https://cdn.arstechnica.net/wp-content/uploads/2017/09/mario-collage-800x450.jpg', size: 2400000, type: 'image', - mime: 'image/jpeg' + mime: 'image/jpeg', }; export const EMPTY_UPLOAD_STATUS: IUploadStatus = { @@ -37,5 +37,26 @@ export const EMPTY_UPLOAD_STATUS: IUploadStatus = { progress: 0, thumbnail_url: null, type: null, - temp_id: null + temp_id: null, +}; + +// for targeted cancellation +export const UPLOAD_SUBJECTS = { + EDITOR: 'editor', + COMMENT: 'comment', + AVATAR: 'avatar', +}; + +export const UPLOAD_TARGETS = { + NODES: 'nodes', + COMMENTS: 'comments', + PROFILES: 'profiles', + OTHER: 'other', +}; + +export const UPLOAD_TYPES: Record = { + IMAGE: 'image', + AUDIO: 'audio', + VIDEO: 'video', + OTHER: 'other', }; diff --git a/src/redux/uploads/sagas.ts b/src/redux/uploads/sagas.ts index 65bd24d8..ab64576c 100644 --- a/src/redux/uploads/sagas.ts +++ b/src/redux/uploads/sagas.ts @@ -1,16 +1,35 @@ -import { takeEvery, all, spawn, call, put, take, fork, race } from 'redux-saga/effects'; +import { + takeEvery, all, spawn, call, put, take, fork, race, +} from 'redux-saga/effects'; +import { postUploadFile } from './api'; import { UPLOAD_ACTIONS } from '~/redux/uploads/constants'; import { - uploadUploadFiles, uploadSetStatus, uploadAddStatus, uploadDropStatus, uploadAddFile + uploadUploadFiles, + uploadSetStatus, + uploadAddStatus, + uploadDropStatus, + uploadAddFile, } from './actions'; import { reqWrapper } from '../auth/sagas'; -import { createUploader, uploadGetThumb, fakeUploader } from '~/utils/uploader'; +import { createUploader, uploadGetThumb } from '~/utils/uploader'; import { HTTP_RESPONSES } from '~/utils/api'; import { VALIDATORS } from '~/utils/validators'; -import { UUID, IFileWithUUID, IFile } from '../types'; +import { IFileWithUUID, IFile, IUploadProgressHandler } from '../types'; -function* uploadCall({ temp_id, onProgress, file }) { - return yield call(reqWrapper, fakeUploader, { file: { url: 'some', error: 'cant do this boss' }, onProgress, mustSucceed: true }); +function* uploadCall({ + file, + temp_id, + target, + type, + onProgress, +}: IFileWithUUID & { onProgress: IUploadProgressHandler }) { + return yield call(reqWrapper, postUploadFile, { + file, + temp_id, + type, + target, + onProgress, + }); } function* onUploadProgress(chan) { @@ -30,14 +49,27 @@ function* uploadCancelWorker(id) { return true; } -function* uploadWorker(file: File, temp_id: UUID) { - const [promise, chan] = createUploader<{ temp_id; file }, { temp_id }>(uploadCall, { temp_id }); - yield fork(onUploadProgress, chan); +function* uploadWorker({ + file, temp_id, target, type, +}: IFileWithUUID) { + const [promise, chan] = createUploader, Partial>( + uploadCall, + { temp_id, target, type } + ); - return yield call(promise, { temp_id, file }); + fork(onUploadProgress, chan); + + return yield call(promise, { + temp_id, + file, + target, + type, + }); } -function* uploadFile({ file, temp_id }: IFileWithUUID) { +function* uploadFile({ + file, temp_id, type, target, subject, +}: IFileWithUUID) { if (!file.type || !VALIDATORS.IS_IMAGE_MIME(file.type)) { return { error: 'File_Not_Image', status: HTTP_RESPONSES.BAD_REQUEST, data: {} }; } @@ -57,10 +89,13 @@ function* uploadFile({ file, temp_id }: IFileWithUUID) { ) ); - const { - result, cancel, cancel_editing, save_inventory, - } = yield race({ - result: call(uploadWorker, file, temp_id), + const { result, cancel, cancel_editing } = yield race({ + result: call(uploadWorker, { + file, + temp_id, + target, + type, + }), cancel: call(uploadCancelWorker, temp_id), // subject_cancel: call(uploadSubjectCancelWorker, subject) // add here CANCEL_UPLOADS worker, that will watch for subject @@ -68,7 +103,7 @@ function* uploadFile({ file, temp_id }: IFileWithUUID) { // save_inventory: take(INVENTORY_ACTIONS.SAVE_INVENTORY), }) as any; - if (cancel || cancel_editing || save_inventory) { + if (cancel || cancel_editing) { return yield put(uploadDropStatus(temp_id)); } @@ -80,8 +115,6 @@ function* uploadFile({ file, temp_id }: IFileWithUUID) { ); } - console.log('upload', data); - yield put( uploadSetStatus(temp_id, { is_uploading: false,