From 1874a05820084045dd5554743065f8cf5b4b8509 Mon Sep 17 00:00:00 2001 From: bada308 <203190@jnu.ac.kr> Date: Sun, 3 Mar 2024 23:46:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=BB=A8=EB=B2=A4=EC=85=98=EC=9D=84=20?= =?UTF-8?q?=EC=A4=80=EC=88=98=ED=95=98=EB=8F=84=EB=A1=9D=20React=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=97=90=EC=84=9C=20FormEv?= =?UTF-8?q?ent=20=ED=83=80=EC=9E=85=20=EC=82=AC=EC=9A=A9=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applicationLayout/BooleanTextarea.component.tsx | 3 ++- .../application/applicationNode/Textarea.component.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx b/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx index bba5e39c..c63a93db 100644 --- a/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx +++ b/frontend/components/application/applicationLayout/BooleanTextarea.component.tsx @@ -8,6 +8,7 @@ import type { ApplicationQuestion, } from "@/src/constants/application/type"; import { useLocalStorage } from "@/src/hooks/useLocalstorage.hook"; +import { FormEvent } from "react"; interface TextAreaProps { node: { @@ -22,7 +23,7 @@ interface TextAreaProps { const TextArea = ({ node }: TextAreaProps) => { const [textValue, setTextValue] = useLocalStorage(node.name, ""); - const onInput = (e: React.FormEvent) => { + const onInput = (e: FormEvent) => { setTextValue(e.currentTarget.value.slice(0, MAX_TEXT_LENGTH)); }; diff --git a/frontend/components/application/applicationNode/Textarea.component.tsx b/frontend/components/application/applicationNode/Textarea.component.tsx index 67a597ea..27ec7abf 100644 --- a/frontend/components/application/applicationNode/Textarea.component.tsx +++ b/frontend/components/application/applicationNode/Textarea.component.tsx @@ -7,6 +7,7 @@ import { ApplicationTextarea, } from "@/src/constants/application/type"; import { useLocalStorage } from "@/src/hooks/useLocalstorage.hook"; +import { FormEvent } from "react"; interface ApplicationTextareaProps { data: ApplicationNode; @@ -16,7 +17,7 @@ const ApplicationTexarea = ({ data }: ApplicationTextareaProps) => { const textData = data as ApplicationTextarea; const [value, setValue] = useLocalStorage(textData.name, ""); - const onInput = (e: React.FormEvent) => { + const onInput = (e: FormEvent) => { setValue(e.currentTarget.value.slice(0, MAX_TEXT_LENGTH)); };