@@ -2,7 +2,7 @@ import { StyledText } from '../Text/StyledText';
22import theme from '../../styles/theme' ;
33import { CommentLayout , SendContainer , CommentTextarea , SendImg } from './styles' ;
44import Send from '/Send.svg' ;
5- import { useEffect , useRef , useState } from 'react' ;
5+ import React , { useEffect , useRef , useState } from 'react' ;
66import { CommentProps } from './dto' ;
77
88const Comment : React . FC < CommentProps > = ( { content, sendComment } ) => {
@@ -17,7 +17,7 @@ const Comment: React.FC<CommentProps> = ({ content, sendComment }) => {
1717 }
1818 } , [ comment ] ) ;
1919
20- const onChangeComment = ( e : any ) => {
20+ const onChangeComment = ( e : React . ChangeEvent < HTMLTextAreaElement > ) => {
2121 if ( e . target . value . length >= 100 ) {
2222 return ;
2323 } else {
@@ -26,14 +26,14 @@ const Comment: React.FC<CommentProps> = ({ content, sendComment }) => {
2626 } ;
2727
2828 // textarea에서 enter 입력 시 실행
29- const onKeyDown = ( e : any ) : void => {
29+ const onKeyDown = ( e : React . KeyboardEvent < HTMLTextAreaElement > ) : void => {
3030 if ( comment === '' ) {
3131 e . preventDefault ( ) ;
3232 return ;
3333 }
3434 if ( e . key === 'Enter' && ! e . shiftKey ) {
3535 e . preventDefault ( ) ;
36- sendComment ( e . target . value ) ;
36+ sendComment ( e . currentTarget . value ) ;
3737 setComment ( '' ) ;
3838 }
3939 } ;
0 commit comments