Overnap

방 정보 컴포넌트 추가

import React from 'react';
import { Room } from './types';
export const RoomInfo: React.FC<Room> = (props: Room) => {
return (
<div className={`flex items-center place-content-between m-2 w-5/6
${props.currentUsers < props.maxUsers ?
'bg-white active:bg-green-100' :
'bg-gray-200 active:bg-gray-200'}
rounded shadow hover:shadow-md`}>
<span className='mt-2 mb-2 ml-3 text-gray-600 text-lg'>{props.name}</span>
<span className='mt-2 mb-2 mr-3 text-gray-500 text-right'>
{props.currentUsers}/{props.maxUsers}
</span>
</div>
);
}
export interface Room {
uuid: string;
name: string;
currentUsers: number;
maxUsers: number;
}