diff --git a/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.AdvanceSettings.tsx b/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.AdvanceSettings.tsx index 973ecc245a..4bb619bd48 100644 --- a/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.AdvanceSettings.tsx +++ b/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.AdvanceSettings.tsx @@ -1,22 +1,24 @@ import React from 'react'; +import { useFormContext } from 'react-hook-form'; import { Link } from 'web-marketplace/src/components/atoms'; import { TextButton } from 'web-components/src/components/buttons/TextButton'; import CheckboxLabel from 'web-components/src/components/inputs/new/CheckboxLabel/CheckboxLabel'; +import { ChooseCreditsFormSchemaType } from './ChooseCreditsForm.schema'; + export function AdvanceSettings({ advanceSettingsOpen, toggleAdvancedSettings, creditVintages, - register, handleCreditVintageOptions, }: { advanceSettingsOpen: boolean; toggleAdvancedSettings: (e: React.MouseEvent) => void; creditVintages: { date: string; credits: string; batchDenom: string }[]; - register: any; handleCreditVintageOptions: (e: React.ChangeEvent) => void; }) { + const { register } = useFormContext(); return (
diff --git a/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.tsx b/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.tsx index 8057633f11..689666e673 100644 --- a/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.tsx +++ b/web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.tsx @@ -139,7 +139,6 @@ export function ChooseCreditsForm({ creditVintages={creditVintages} advanceSettingsOpen={advanceSettingsOpen} toggleAdvancedSettings={toggleAdvancedSettings} - register={form.register} handleCreditVintageOptions={handleCreditVintageOptions} />