Use rome and initial format

This commit is contained in:
Sacha Weatherstone
2023-07-09 13:59:31 +10:00
parent a65bc37be5
commit 20ac657b51
90 changed files with 3350 additions and 3092 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ import {
FieldValues,
Path,
SubmitHandler,
useForm
useForm,
} from "react-hook-form";
import { H4 } from "@components/UI/Typography/H4.js";
import { Subtle } from "@components/UI/Typography/Subtle.js";
@@ -49,11 +49,11 @@ export function DynamicForm<T extends FieldValues>({
submitType = "onChange",
hasSubmitButton,
defaultValues,
fieldGroups
fieldGroups,
}: DynamicFormProps<T>) {
const { handleSubmit, control, getValues } = useForm<T>({
mode: submitType,
defaultValues: defaultValues
defaultValues: defaultValues,
});
const isDisabled = (disabledBy?: DisabledBy<T>[]): boolean => {
@@ -76,7 +76,7 @@ export function DynamicForm<T extends FieldValues>({
{...(submitType === "onSubmit"
? { onSubmit: handleSubmit(onSubmit) }
: {
onChange: handleSubmit(onSubmit)
onChange: handleSubmit(onSubmit),
})}
>
{fieldGroups.map((fieldGroup, index) => (