import { useEffect, useState } from 'react'; import { Link } from 'react-router-dom' import roomApi from '../../apis/room.api'; import userApi from '../../apis/user.api'; const RoomSingle = () => { const [roomNum, setRoomNum] = useState('') const [room, setRoom] = useState([]) const roomId = localStorage.getItem('user'); const channelId = 1 const A = [] // async function getJoinRoom(Id) { // try { // console.log('id:',id) // const User = await userApi.getUser({id: Id}) // console.log('User1:',User) // console.log('User2:',User.roomNumber) // const RoomNumArr = User.roomNumber // console.log('setRoomNum:',RoomNumArr) // const Room = await roomApi.getRoom(RoomNumArr) // } catch (error) { // // catchErrors(error, setError) // } // } // useEffect(() => { // getJoinRoom(id) // }, [id]) return (