RoomList.js 996 Bytes
Newer Older
Kim, Chaerin's avatar
Kim, Chaerin committed
1
2
import AddRoom from "./AddRoom";
import RoomSingle from "./RoomSingle";
권병윤's avatar
as    
권병윤 committed
3
//import userApi from "../../apis/user.api";
Kim, Chaerin's avatar
Kim, Chaerin committed
4
5

const RoomList = () => {
권병윤's avatar
as    
권병윤 committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  // const userid = localStorage.getItem("user");//로컬 스토리지에 있는 내 유저 아이디 받아온것.

  // useEffect(async() => {
  //   const { data } = await userApi.getUser(userid);

  //   return () => {
  //     cleanup
  //   }
  // }, [input])
  // // 내 유저 아이디로 서버에서 그 아이디에 맞는 정보 가져오기
  // const allroomid = data.roomNumber; //내가 속해있는 방의 id전부 불러와서
  // const i = null;

  // function joinedroom(allroomid) { //그 갯수만큼 반복을 시킨다. 이때, 
  //   for (i=0; i<allroomid.length; i++) {
  //     <RoomSingle />
  //     localStorage.setItem(`joinroomid${i+1}`, allroomid[i]);
  //   }
  // }
Kim, Chaerin's avatar
Kim, Chaerin committed
25
  return (
우지원's avatar
우지원 committed
26
    <div>
Kim, Chaerin's avatar
Kim, Chaerin committed
27
      <AddRoom />
우지원's avatar
우지원 committed
28
      <div className="mb-3">
우지원's avatar
우지원 committed
29
30
31
        <RoomSingle />
      </div>
    </div>
Kim, Chaerin's avatar
Kim, Chaerin committed
32
33
34
35
  );
};

export default RoomList;