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

eslint fix

This commit is contained in:
muerwre 2019-08-09 12:43:43 +07:00
parent fa4d51360b
commit 5fb3445741
6 changed files with 9248 additions and 18023 deletions

17999
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,20 +1,13 @@
import React, {
FC,
useCallback,
useEffect,
useState,
ChangeEventHandler,
DragEventHandler
} from 'react';
import uuid from 'uuid4';
import { connect } from 'react-redux';
import assocPath from 'ramda/es/assocPath';
import append from 'ramda/es/append';
import { INode, IFileWithUUID, IFile } from '~/redux/types';
import { INode } from '~/redux/types';
import * as UPLOAD_ACTIONS from '~/redux/uploads/actions';
import { selectUploads } from '~/redux/uploads/selectors';
import { ImageGrid } from '~/components/editors/ImageGrid';
import { moveArrItem } from '~/utils/fn';
import { IUploadStatus } from '~/redux/uploads/reducer';
const mapStateToProps = selectUploads;

View file

@ -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,5 @@ export const EMPTY_UPLOAD_STATUS: IUploadStatus = {
progress: 0,
thumbnail_url: null,
type: null,
temp_id: null,
temp_id: null
};

View file

@ -1,6 +1,4 @@
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 { UPLOAD_ACTIONS } from '~/redux/uploads/constants';
import {
uploadUploadFiles, uploadSetStatus, uploadAddStatus, uploadDropStatus, uploadAddFile

View file

@ -23,22 +23,22 @@ export const HTTP_RESPONSES = {
TOO_MANY_REQUESTS: 429,
};
export const resultMiddleware = (<)T extends {}>({
export const resultMiddleware = (<T extends {}>({
status,
data,
}: {
status: number;
data: T;
}): { status: number; data: T } => data && { status, data };
}): { status: number; data: T } => ({ status, data }));
export const errorMiddleware = <T extends any>(debug): IResultWithStatus<T> => debug && debug.response
? debug.response
: {
status: HTTP_RESPONSES.CONNECTION_REFUSED,
data: {},
debug,
error: 'Ошибка сети',
};
export const errorMiddleware = <T extends any>(debug): IResultWithStatus<T> => (debug && debug.response
? debug.response
: {
status: HTTP_RESPONSES.CONNECTION_REFUSED,
data: {},
debug,
error: 'Ошибка сети',
});
export const configWithToken = (
access: string,

9233
yarn.lock Normal file

File diff suppressed because it is too large Load diff