import { useEffect, useState } from 'react'; import { Link } from 'react-router-dom' import userApi from '../../apis/user.api'; const RoomSingle = () => { const [room, setRoom] = useState('') const id = localStorage.getItem('user'); const channelId = 1 async function getRoom(id) { try { const Room = await userApi.getUser(id) setRoom(Room.data.roomNumber) } catch (error) { // catchErrors(error, setError) } } useEffect(() => { getRoom(id) }, [id]) return (