@@ -9,23 +9,26 @@ interface Props {
99 handleSendFullContentLog : ( fullContent : string ) => void ;
1010}
1111
12- const getTextArea = ( elementId : string ) : HTMLInputElement => document . getElementById ( "session" ) as HTMLInputElement ;
12+ const getTextArea = ( elementId : string ) : HTMLInputElement =>
13+ document . getElementById ( 'session' ) as HTMLInputElement ;
1314
1415const handleSetSessionContent = ( sessionContent : string ) => {
15- const sessionTextArea : HTMLInputElement = getTextArea ( " session" ) ;
16- sessionTextArea ? sessionTextArea . value = sessionContent : undefined ;
17- }
16+ const sessionTextArea : HTMLInputElement = getTextArea ( ' session' ) ;
17+ sessionTextArea ? ( sessionTextArea . value = sessionContent ) : undefined ;
18+ } ;
1819
1920const getFullContent = ( currenSessionContent : string ) => {
20- const sessionTextArea : HTMLInputElement = getTextArea ( "session" ) ;
21- return ( sessionTextArea && ( sessionTextArea . value != currenSessionContent ) ) ? sessionTextArea . value : undefined ;
22- }
21+ const sessionTextArea : HTMLInputElement = getTextArea ( 'session' ) ;
22+ return sessionTextArea && sessionTextArea . value != currenSessionContent
23+ ? sessionTextArea . value
24+ : undefined ;
25+ } ;
2326
2427export const SessionComponent : React . FC < Props > = props => {
2528 const { log, handleSendFullContentLog } = props ;
2629 const { labelTextarea, studentBoard, sendBtn, undoBtn } = classes ;
27-
28- React . useEffect ( ( ) => {
30+
31+ React . useEffect ( ( ) => {
2932 handleSetSessionContent ( log ) ;
3033 } , [ log ] ) ;
3134
@@ -39,7 +42,6 @@ export const SessionComponent: React.FC<Props> = props => {
3942 rowsMax = { 20 }
4043 rowsMin = { 20 }
4144 className = { studentBoard }
42- disabled = { false }
4345 />
4446 < Button
4547 variant = "contained"
0 commit comments