diff --git a/packages/livechat/src/components/Form/HookFormExample/stories.tsx b/packages/livechat/src/components/Form/HookFormExample/stories.tsx index 946d61f07323..a69363e04284 100644 --- a/packages/livechat/src/components/Form/HookFormExample/stories.tsx +++ b/packages/livechat/src/components/Form/HookFormExample/stories.tsx @@ -22,9 +22,7 @@ export default { export const Default: Story> = (args) => { const { - // register, handleSubmit, - // watch, formState: { errors }, control, reset, diff --git a/packages/livechat/src/routes/Register/index.tsx b/packages/livechat/src/routes/Register/index.tsx index 04314d95dd08..3860eca066af 100644 --- a/packages/livechat/src/routes/Register/index.tsx +++ b/packages/livechat/src/routes/Register/index.tsx @@ -23,6 +23,9 @@ type department = { [key: string]: unknown; }; +// Custom field as in the form payload +type FormPayloadCustomField = { [key: string]: string }; + type ContextReturn = { config: { departments?: department[]; @@ -112,7 +115,7 @@ export const Register = ({ screenProps }: { screenProps: { [key: string]: unknow name: string; email: string; department: string; - customFields: { [key: string]: string }; + customFields: FormPayloadCustomField; }) => { const fields = { name, @@ -199,7 +202,6 @@ export const Register = ({ screenProps }: { screenProps: { [key: string]: unknow placeholder={t('insert_your_field_here', { field: t('name') })} disabled={loading} field={field} - // onInput={(target: HTMLInputElement) => setName(target.value)} /> )} /> @@ -256,13 +258,7 @@ export const Register = ({ screenProps }: { screenProps: { [key: string]: unknow -