Lint all the things

This commit is contained in:
Dave
2025-08-19 16:23:29 -04:00
parent f6d6b548be
commit 33fb60ca1a
640 changed files with 2129 additions and 3927 deletions

View File

@@ -1,6 +1,6 @@
import { UploadOutlined } from "@ant-design/icons";
import { Progress, Result, Space, Upload } from "antd";
import React, { useMemo, useState } from "react";
import { useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -32,7 +32,7 @@ export function DocumentsUploadComponent({
const notification = useNotification();
const pct = useMemo(() => {
return parseInt((totalSize / ((bodyshop && bodyshop.jobsizelimit) || 1)) * 100);
return parseInt((totalSize / (bodyshop?.jobsizelimit || 1)) * 100, 10);
}, [bodyshop, totalSize]);
if (pct > 100 && !ignoreSizeLimit)
@@ -63,7 +63,7 @@ export function DocumentsUploadComponent({
beforeUpload={(file, fileList) => {
if (ignoreSizeLimit) return true;
const newFiles = fileList.reduce((acc, val) => acc + val.size, 0);
const shouldStopUpload = (totalSize + newFiles) / ((bodyshop && bodyshop.jobsizelimit) || 1) >= 1;
const shouldStopUpload = (totalSize + newFiles) / (bodyshop?.jobsizelimit || 1) >= 1;
//Check to see if old files plus newly uploaded ones will be too much.
if (shouldStopUpload) {
@@ -109,7 +109,7 @@ export function DocumentsUploadComponent({
{t("documents.labels.usage", {
percent: pct,
used: formatBytes(totalSize),
total: formatBytes(bodyshop && bodyshop.jobsizelimit)
total: formatBytes(bodyshop?.jobsizelimit)
})}
</span>
</Space>