import React, { useState } from 'react' import { ListGroup } from 'react-bootstrap'; function OpenList(props) { const [list, setList] = useState([ { room: '테스트 방3', memnum: 7, admin: '가영2' }, { room: '테스트 방4', memnum: 2, admin: '수현2' }] ); function enterChatRoomCH(e) { const roomName = e.target.name props.enterChatRoom(roomName) // 각각의 room으로 들어가도록 설정해야 함 props.setRoomName(roomName) // props.clearChat() } return (
{list.map((list, index) => {list.room} )}
) } export default OpenList