diff --git a/apps/portal/src/components/questions/ContributeQuestionCard.tsx b/apps/portal/src/components/questions/ContributeQuestionCard.tsx index 62e2ca8e..683d55f5 100644 --- a/apps/portal/src/components/questions/ContributeQuestionCard.tsx +++ b/apps/portal/src/components/questions/ContributeQuestionCard.tsx @@ -1,4 +1,4 @@ -import type { ComponentProps, Ref } from 'react'; +import type { ComponentProps, ForwardedRef } from 'react'; import { forwardRef } from 'react'; import type { UseFormRegisterReturn } from 'react-hook-form'; import { useForm } from 'react-hook-form'; @@ -16,16 +16,22 @@ export type ContributeQuestionData = { questionType: string; }; -type FormTextInputProps = Omit, 'onChange'> & +type TextInputProps = ComponentProps; + +type FormTextInputProps = Omit & Pick, 'onChange'>; function FormTextInputWithRef( props: FormTextInputProps, - ref?: Ref, + ref?: ForwardedRef, ) { const { onChange, ...rest } = props; return ( - onChange(event)} {...rest} ref={ref} /> + onChange(event)} + /> ); } @@ -54,21 +60,24 @@ export default function ContributeQuestionCard({