import React, { useEffect, useState } from 'react'; import { Form, Button, Row } from 'react-bootstrap'; // import axios from "axios"; function Chat(props) { // const [username, setUsername] = useState('') const username = localStorage.getItem('name'); function handleChange(e) { e.preventDefault() props.setInner(e.target.value) console.log(e.target.value) } function sendMsgCH(e) { props.sendMsg(e) } // async function getLoginedUser() { //email로 db에서 찾아오기 // const userid = localStorage.getItem('user') // const response = await axios.post(`/users/${userid}`, { 'email': userid }) // setUsername(response.data.username) // } // useEffect(() => { // getLoginedUser() // console.log('Chat에서 useEffect', username) // }) return (