mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-11-18 07:22:06 +00:00
fix linting errors - unused deps etc
This commit is contained in:
@@ -52,14 +52,11 @@ export const AsyncSelectField = <
|
||||
hideErrorMessage,
|
||||
required,
|
||||
size,
|
||||
|
||||
loadOption,
|
||||
loadOptions,
|
||||
onInformChange,
|
||||
|
||||
placeholder,
|
||||
separators,
|
||||
|
||||
...selectProps
|
||||
}: AsyncSelectFieldProps<TFieldValues, TFieldName, IsMulti, T, D>) => {
|
||||
const t = useTranslations("App");
|
||||
|
||||
@@ -88,10 +88,7 @@ export const Select = <
|
||||
T = string,
|
||||
D = unknown,
|
||||
>({
|
||||
className,
|
||||
required,
|
||||
size,
|
||||
|
||||
placeholder,
|
||||
separators,
|
||||
hasError,
|
||||
@@ -121,7 +118,7 @@ export const Select = <
|
||||
}}
|
||||
classNames={{
|
||||
...classNames(hasError ?? false, separators ?? false),
|
||||
...(classNameOverrides ?? {}),
|
||||
...classNameOverrides,
|
||||
}}
|
||||
{...selectProps}
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import React from "react";
|
||||
|
||||
import { flatMap, get, isArray, isNil, isObject } from "lodash";
|
||||
import { useTranslations } from "next-intl";
|
||||
import {
|
||||
Controller,
|
||||
FieldPath,
|
||||
@@ -47,13 +44,9 @@ export const SelectField = <
|
||||
label,
|
||||
hideErrorMessage,
|
||||
required,
|
||||
|
||||
placeholder,
|
||||
separators,
|
||||
options,
|
||||
...selectProps
|
||||
}: SelectFieldProps<TFieldValues, TFieldName, IsMulti, T, D>) => {
|
||||
const t = useTranslations("App");
|
||||
const form = useFormContext<TFieldValues>();
|
||||
|
||||
const {
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
Controller,
|
||||
FieldPath,
|
||||
FieldValues,
|
||||
useFormContext,
|
||||
} from "react-hook-form";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
@@ -34,15 +33,9 @@ export const SwitchField = <
|
||||
disabled,
|
||||
className,
|
||||
labelClassName,
|
||||
|
||||
childrenWrapperClassName,
|
||||
hideErrorMessage,
|
||||
|
||||
...rest
|
||||
} = props;
|
||||
const form = useFormContext<TFieldValues>();
|
||||
|
||||
return (
|
||||
return (
|
||||
<Field
|
||||
{...{
|
||||
name,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from "react";
|
||||
import type {HTMLProps, ReactNode} from 'react'
|
||||
|
||||
import { get } from "lodash";
|
||||
import {
|
||||
@@ -19,9 +19,9 @@ type TextAreaFieldProps<
|
||||
TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
||||
> = Prettify<
|
||||
GenericFieldProps<TFieldValues, TFieldName> &
|
||||
Omit<React.HTMLProps<HTMLTextAreaElement>, "ref" | "name"> & {
|
||||
Omit<HTMLProps<HTMLTextAreaElement>, "ref" | "name"> & {
|
||||
handleChanged?: (props: { name: string }) => void;
|
||||
startIcon?: React.ReactNode;
|
||||
startIcon?: ReactNode;
|
||||
required?: boolean;
|
||||
}
|
||||
>;
|
||||
@@ -40,11 +40,7 @@ export const TextAreaField = <
|
||||
labelClassName,
|
||||
childrenWrapperClassName,
|
||||
hideErrorMessage = false,
|
||||
|
||||
startIcon,
|
||||
handleChanged,
|
||||
required,
|
||||
|
||||
disabled,
|
||||
...rest
|
||||
} = props;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { useState } from "react";
|
||||
|
||||
import { on } from "events";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { FieldPath, FieldValues } from "react-hook-form";
|
||||
import { FaExternalLinkAlt } from "react-icons/fa";
|
||||
|
||||
Reference in New Issue
Block a user