Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강동현
/
nodejs-game
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Overnap
2021-05-31 05:21:53 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
593301c2e1d32dd36a8b478bbb098928bc7a890d
593301c2
1 parent
f2951c89
방 정보 컴포넌트 프롭 타입 수정
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
web/src/components/rooms/RoomInfo.tsx
web/src/components/rooms/RoomInfo.tsx
View file @
593301c
import React from 'react';
import { Room } from './types';
export const RoomInfo: React.FC<Room> = (props: Room) => {
interface RoomProps {
room: Room
}
export const RoomInfo: React.FC<RoomProps> = ({ room }) => {
return (
<div className={`flex items-center place-content-between m-2 w-5/6
${
props.currentUsers < props
.maxUsers ?
${
room.currentUsers < room
.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 ml-3 text-gray-600 text-lg'>{
room
.name}</span>
<span className='mt-2 mb-2 mr-3 text-gray-500 text-right'>
{
props.currentUsers}/{props
.maxUsers}
{
room.currentUsers}/{room
.maxUsers}
</span>
</div>
);
...
...
Please
register
or
login
to post a comment