Lint all the things
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import { Upload } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { handleUpload } from "./documents-local-upload.utility";
|
||||
import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
||||
import LockWrapperComponent from "../lock-wrapper/lock-wrapper.component";
|
||||
@@ -12,13 +12,11 @@ import { useTranslation } from "react-i18next";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
|
||||
export function DocumentsLocalUploadComponent({
|
||||
children,
|
||||
currentUser,
|
||||
bodyshop,
|
||||
job,
|
||||
vendorid,
|
||||
|
||||
@@ -15,7 +15,7 @@ export const handleUpload = async ({ ev, context, notification }) => {
|
||||
ims_token: bodyshop.localmediatoken
|
||||
},
|
||||
onUploadProgress: (e) => {
|
||||
if (!!onProgress) onProgress({ percent: (e.loaded / e.total) * 100 });
|
||||
if (onProgress) onProgress({ percent: (e.loaded / e.total) * 100 });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@ export const handleUpload = async ({ ev, context, notification }) => {
|
||||
);
|
||||
|
||||
if (imexMediaServerResponse.status !== 200) {
|
||||
if (!!onError) {
|
||||
if (onError) {
|
||||
onError(imexMediaServerResponse.statusText);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user