Lint all the things
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
import { Result } from "antd";
|
||||
import React, { useMemo } from "react";
|
||||
import { useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -17,7 +17,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
technician: selectTechnician,
|
||||
currentUser: selectCurrentUser
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
|
||||
@@ -26,12 +26,12 @@ export function TimeTicketShiftContainer({ bodyshop, technician, currentUser, is
|
||||
const employeeId = useMemo(() => {
|
||||
const assoc = bodyshop.associations.filter((a) => a.useremail === currentUser.email)[0];
|
||||
|
||||
return assoc && assoc.user && assoc.user.employee && assoc.user.employee.id;
|
||||
return assoc?.user && assoc.user.employee && assoc.user.employee.id;
|
||||
}, [bodyshop, currentUser.email]);
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_ACTIVE_SHIFT_TIME_TICKETS, {
|
||||
variables: {
|
||||
employeeId: isTechConsole ? technician && technician.id : employeeId
|
||||
employeeId: isTechConsole ? technician?.id : employeeId
|
||||
},
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only"
|
||||
@@ -40,7 +40,7 @@ export function TimeTicketShiftContainer({ bodyshop, technician, currentUser, is
|
||||
if (loading) return <LoadingSpinner />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
if (!employeeId && !(technician && technician.id))
|
||||
if (!employeeId && !technician?.id)
|
||||
return (
|
||||
<div>
|
||||
<Result
|
||||
|
||||
Reference in New Issue
Block a user