Lint all the things
This commit is contained in:
@@ -1,28 +1,19 @@
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Button } from "antd";
|
||||
import dayjs from "../../utils/day";
|
||||
import React, { useState } from "react";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { UPDATE_TIME_TICKETS } from "../../graphql/timetickets.queries";
|
||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import { selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser
|
||||
});
|
||||
|
||||
export function TimeTicketsCommit({
|
||||
bodyshop,
|
||||
currentUser,
|
||||
timetickets,
|
||||
disabled,
|
||||
loadingCallback,
|
||||
completedCallback,
|
||||
refetch
|
||||
}) {
|
||||
export function TimeTicketsCommit({ currentUser, timetickets, disabled, loadingCallback, completedCallback }) {
|
||||
const { t } = useTranslation();
|
||||
const [updateTimeTickets] = useMutation(UPDATE_TIME_TICKETS);
|
||||
const notification = useNotification();
|
||||
@@ -71,10 +62,11 @@ export function TimeTicketsCommit({
|
||||
type: "success",
|
||||
message: t("timetickets.successes.committed")
|
||||
});
|
||||
if (!!completedCallback) completedCallback([]);
|
||||
if (!!loadingCallback) loadingCallback(false);
|
||||
if (completedCallback) completedCallback([]);
|
||||
if (loadingCallback) loadingCallback(false);
|
||||
}
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// NOP OP
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user