Created
April 13, 2024 15:15
-
-
Save GuillaumeDaviid/5290a5a59b311175d5f831b55a44f643 to your computer and use it in GitHub Desktop.
list message - claude 3
This file contains hidden or 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
| const listMsg = countMsg > 0 ? | |
| (msg.me.map((item, key) => <div className='chat_bot_content-msg'><h2 className='chat_bot-msg'>Moi :</h2><p className='chat_bot-msg' key={item.key}>{item}</p> | |
| <h2 className='chat_bot-msg'>Bot :</h2> {msg.bot[key]}</div>)) | |
| : (<p></p>) | |
| return ( | |
| <div> | |
| <h1 className='title'>Chat Bot</h1> | |
| <div className="chat_bot" id="chat_bot"> | |
| <div className='chat_bot_content-msg' id='chat_bot_content-msg'> | |
| <h2 className='chat_bot-msg'>Bot :</h2> | |
| <p className='chat_bot-msg'>Bonjour, Je suis un bot codé avec React.js</p> | |
| </div> | |
| {listMsg} | |
| </div> | |
| <form className='form'> | |
| <input className='msg' id="msg" placeholder='Message' value={newMsg} onChange={handleChange}></input> | |
| <button className='btn' onClick={handleClick}>Envoyer</button> | |
| </form> | |
| </div> | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment