Skip to content

Commit

Permalink
Fix missing imports in Form component
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 committed Jun 22, 2023
1 parent 8cf274f commit f0414cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Components/Form/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { isEmpty, omitBy } from "lodash";
import { useEffect, useState } from "react";
import { useEffect, useMemo, useState } from "react";
import { classNames } from "../../Utils/utils";
import { Cancel, Submit } from "../Common/components/ButtonV2";
import { FieldValidator } from "./FieldValidators";
import { FormContextValue, createFormContext } from "./FormContext";
import { FieldChangeEvent } from "./FormFields/Utils";
import { FormDetails, FormErrors, formReducer } from "./Utils";
import { FormDetails, FormErrors, FormState, formReducer } from "./Utils";
import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave";

type Props<T extends FormDetails> = {
Expand Down Expand Up @@ -77,7 +77,7 @@ const Form = <T extends FormDetails>({
noValidate
>
<DraftSection
handleDraftSelect={(newState: any) => {
handleDraftSelect={(newState: FormState<T>) => {
dispatch({ type: "set_state", state: newState });
}}
formData={state.form}
Expand All @@ -92,7 +92,7 @@ const Form = <T extends FormDetails>({
type: "set_field",
name,
value,
error: validate && validate(value),
error: validate?.(value),
}),
value: state.form[name],
error: state.errors[name],
Expand Down

0 comments on commit f0414cc

Please sign in to comment.