Created
March 21, 2019 14:19
-
-
Save WDever/5acf40b9c91e74af9c3a82944a79252f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChatBot extends React.Component<ChatBotProps, ChatBotState> { | |
public handleToggle = async (): Promise<void> => { | |
this.setState(() => ({ | |
toggle: !this.state.toggle, | |
})); | |
this.ChatScroll = React.createRef(); | |
await console.log(this.ChatScroll); | |
// await console.log(this.ChatScroll.scrollTop); | |
}; | |
render ( | |
return ( | |
<ChatBotBody> | |
<ChatBotTopDiv> | |
<ChatBotImg src={ChatBotIcon} alt='' /> | |
한봇 | |
</ChatBotTopDiv> | |
<ChatBox ref={this.ChatScroll}> | |
{chatList} | |
{/* <ReceptionWrapper> | |
<ReceptionBox> | |
<ReceptionText>테스트</ReceptionText> | |
</ReceptionBox> | |
</ReceptionWrapper> | |
<SendWrapper> | |
<SendBox> | |
<SendText>시퍼어저 하늘로우리들ㅇ느 ㅂ려</SendText> | |
</SendBox> | |
</SendWrapper> | |
<SendWrapper> | |
<SendBox> | |
<SendText>ㅁ러쟈ㅐ서ㅏㅣ넘랮;ㅓㄴ아ㅣㄹ머ㅐㅑ;러재;</SendText> | |
</SendBox> | |
</SendWrapper> | |
<ReceptionWrapper> | |
<ReceptionBox> | |
<ReceptionText>테스트</ReceptionText> | |
</ReceptionBox> | |
</ReceptionWrapper> | |
<ReceptionWrapper> | |
<ReceptionBox> | |
<ReceptionText>테스트</ReceptionText> | |
</ReceptionBox> | |
</ReceptionWrapper> | |
<SendWrapper> | |
<SendBox> | |
<SendText>ㅁ러쟈ㅐ서ㅏㅣ넘랮;ㅓㄴ아ㅣㄹ머ㅐㅑ;러재;</SendText> | |
</SendBox> | |
</SendWrapper> | |
<ReceptionWrapper> | |
<ReceptionBox> | |
<ReceptionText>테스트</ReceptionText> | |
</ReceptionBox> | |
</ReceptionWrapper> | |
<ReceptionWrapper> | |
<ReceptionBox> | |
<ReceptionText>테스트</ReceptionText> | |
</ReceptionBox> | |
</ReceptionWrapper> */} | |
</ChatBox> | |
<ChatForm onSubmit={handleEnter}> | |
<ChatInput | |
placeholder='한봇과 안부인사를 해봐요!' | |
onChange={handleChange} | |
value={input} | |
/> | |
</ChatForm> | |
</ChatBotBody> | |
<Bubble src={bubble} alt='' onClick={handleToggle} /> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment