From d8f121926ab3b92fc36e1b6320e840b57630ca7c Mon Sep 17 00:00:00 2001 From: Jeff Sieu Date: Fri, 7 Oct 2022 10:42:18 +0800 Subject: [PATCH] [questions][fix] fix rebase errors --- .../questions/ContributeQuestionCard.tsx | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) 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({