Lint all the things
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { CheckCircleOutlined } from "@ant-design/icons";
|
||||
import { useLazyQuery, useMutation } from "@apollo/client";
|
||||
import { Button, Card, Form, InputNumber, Popover, Space } from "antd";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -22,7 +22,7 @@ import { useNotification } from "../../contexts/Notifications/notificationContex
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ export function ScoreboardAddButton({ bodyshop, job, disabled, ...otherBtnProps
|
||||
}, [visibility, job.id, callQuery]);
|
||||
|
||||
useEffect(() => {
|
||||
if (entryData && entryData.scoreboard && entryData.scoreboard[0]) {
|
||||
if (entryData?.scoreboard && entryData.scoreboard[0]) {
|
||||
form.setFieldsValue(entryData.scoreboard[0]);
|
||||
}
|
||||
}, [entryData, form]);
|
||||
@@ -55,7 +55,7 @@ export function ScoreboardAddButton({ bodyshop, job, disabled, ...otherBtnProps
|
||||
setLoading(true);
|
||||
let result;
|
||||
|
||||
if (entryData && entryData.scoreboard && entryData.scoreboard[0]) {
|
||||
if (entryData?.scoreboard && entryData.scoreboard[0]) {
|
||||
result = await updateScoreboardEntry({
|
||||
variables: {
|
||||
sbId: entryData.scoreboard[0].id,
|
||||
@@ -68,7 +68,7 @@ export function ScoreboardAddButton({ bodyshop, job, disabled, ...otherBtnProps
|
||||
});
|
||||
}
|
||||
|
||||
if (!!result.errors) {
|
||||
if (result.errors) {
|
||||
notification["error"]({
|
||||
message: t("scoreboard.errors.adding", {
|
||||
message: JSON.stringify(result.errors)
|
||||
@@ -136,7 +136,7 @@ export function ScoreboardAddButton({ bodyshop, job, disabled, ...otherBtnProps
|
||||
</Form>
|
||||
)}
|
||||
</div>
|
||||
{entryData && entryData.scoreboard && entryData.scoreboard[0] && (
|
||||
{entryData?.scoreboard && entryData.scoreboard[0] && (
|
||||
<Space>
|
||||
<CheckCircleOutlined style={{ color: "green" }} />
|
||||
<span>{t("jobs.labels.alreadyaddedtoscoreboard")}</span>
|
||||
@@ -145,7 +145,7 @@ export function ScoreboardAddButton({ bodyshop, job, disabled, ...otherBtnProps
|
||||
</Card>
|
||||
);
|
||||
|
||||
const handleClick = (e) => {
|
||||
const handleClick = () => {
|
||||
setLoading(true);
|
||||
const v = job.joblines.reduce(
|
||||
(acc, val) => {
|
||||
|
||||
Reference in New Issue
Block a user