Skip to content

Commit

Permalink
fix: 컨벤션을 준수하도록 React 컴포넌트에서 FormEvent 타입 사용으로 변경한다
Browse files Browse the repository at this point in the history
  • Loading branch information
bada308 committed Mar 3, 2024
1 parent a90b58f commit 1874a05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -22,7 +23,7 @@ interface TextAreaProps {

const TextArea = ({ node }: TextAreaProps) => {
const [textValue, setTextValue] = useLocalStorage(node.name, "");
const onInput = (e: React.FormEvent<HTMLTextAreaElement>) => {
const onInput = (e: FormEvent<HTMLTextAreaElement>) => {
setTextValue(e.currentTarget.value.slice(0, MAX_TEXT_LENGTH));
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -16,7 +17,7 @@ const ApplicationTexarea = ({ data }: ApplicationTextareaProps) => {
const textData = data as ApplicationTextarea;
const [value, setValue] = useLocalStorage(textData.name, "");

const onInput = (e: React.FormEvent<HTMLTextAreaElement>) => {
const onInput = (e: FormEvent<HTMLTextAreaElement>) => {
setValue(e.currentTarget.value.slice(0, MAX_TEXT_LENGTH));
};

Expand Down

0 comments on commit 1874a05

Please sign in to comment.