From 320e92b798856089a92a275a91ab9af22cf2c262 Mon Sep 17 00:00:00 2001 From: 03hoho03 Date: Sun, 7 Apr 2024 16:02:43 +0900 Subject: [PATCH] =?UTF-8?q?[#7]=20xyz=EA=B0=80=EC=84=A4=20=ED=94=84?= =?UTF-8?q?=EB=A6=AC=ED=86=A0=ED=83=80=EC=9D=B4=ED=95=91=20teatarea=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ibulsin/_components/Textarea/index.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/app/(route)/verification/ibulsin/_components/Textarea/index.tsx b/app/(route)/verification/ibulsin/_components/Textarea/index.tsx index eb6390d..ad2fa2b 100644 --- a/app/(route)/verification/ibulsin/_components/Textarea/index.tsx +++ b/app/(route)/verification/ibulsin/_components/Textarea/index.tsx @@ -6,11 +6,10 @@ import cn from 'classnames' import { useForm } from 'react-hook-form' interface TextAreaProps { - fieldKey: 'outline' | 'why' | 'marketResponse' | 'XYZ' + fieldKey: 'outline' | 'why' | 'marketResponse' | 'XYZ' | 'xyz' | 'pretotyping' } function Textarea({ fieldKey }: TextAreaProps) { - console.log(fieldKey) const { register, watch } = useForm() const outlineField = register('outline', { @@ -29,6 +28,14 @@ function Textarea({ fieldKey }: TextAreaProps) { required: '', maxLength: { value: 500, message: '최대 500자까지 작성가능합니다.' }, }) + const xyzField = register('xyz', { + required: '', + maxLength: { value: 500, message: '최대 500자까지 작성가능합니다.' }, + }) + const pretotypingField = register('pretotyping', { + required: '', + maxLength: { value: 500, message: '최대 500자까지 작성가능합니다.' }, + }) const fields = { outline: { @@ -47,6 +54,14 @@ function Textarea({ fieldKey }: TextAreaProps) { register: XYZField, MaxLength: 500, }, + xyz: { + register: xyzField, + MaxLength: 500, + }, + pretotyping: { + register: pretotypingField, + MaxLength: 500, + }, } const countCharacters = () => {