OpenList.js 524 Bytes
Newer Older
Choi Ga Young's avatar
Choi Ga Young committed
1
2
3
4
5
6
7
8
9
10
import React, { useState } from 'react'
import { ListGroup } from 'react-bootstrap';

function OpenList() {
  const [list, setList] = useState([
    { room: '테스트 방3', memnum: 7, admin: '가영2' },
    { room: '테스트 방4', memnum: 2, admin: '수현2' }]
  );
  return (
    <div>
Choi Ga Young's avatar
Choi Ga Young committed
11
12
      {list.map((list, index) =>
        <ListGroup key={index}>
Choi Ga Young's avatar
Choi Ga Young committed
13
14
15
16
17
18
19
20
21
22
          <ListGroup.Item action>
            <h2>{list.room}</h2>
          </ListGroup.Item>
        </ListGroup>
      )}
    </div>
  )
}

export default OpenList