Lint all the things
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Button, Form, Input, Space } from "antd";
|
||||
import { PageHeader } from "@ant-design/pro-layout";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -15,7 +14,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
authLevel: selectAuthLevel,
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(PhonebookFormComponent);
|
||||
@@ -68,7 +67,7 @@ export function PhonebookFormComponent({ authLevel, bodyshop, form, formLoading,
|
||||
dependencies={["firstname", "lastname"]}
|
||||
rules={[
|
||||
({ getFieldsValue }) => ({
|
||||
validator(rule, value) {
|
||||
validator() {
|
||||
const { firstname, lastname, company } = getFieldsValue(["firstname", "lastname", "company"]);
|
||||
|
||||
if (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useMutation, useQuery } from "@apollo/client";
|
||||
import { Form } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
@@ -33,7 +33,7 @@ function PhonebookFormContainer({ refetch, bodyshop }) {
|
||||
variables: { id: phonebookentry },
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
skip: !!!phonebookentry || phonebookentry === "new"
|
||||
skip: !phonebookentry || phonebookentry === "new"
|
||||
});
|
||||
|
||||
const [updatePhonebook] = useMutation(UPDATE_PHONEBOOK);
|
||||
@@ -56,7 +56,7 @@ function PhonebookFormContainer({ refetch, bodyshop }) {
|
||||
delete search.phonebookentry;
|
||||
history({ search: queryString.stringify(search) });
|
||||
if (refetch)
|
||||
refetch().then((r) => {
|
||||
refetch().then(() => {
|
||||
form.resetFields();
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user