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-06-09 19:44:03 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
22c92d18ffa96e87702f1449ab72a71b34733790
22c92d18
1 parent
c46ddcb0
UserInfo 컴포넌트 추가 및 Room 컴포넌트에 적용
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
web/src/components/room/UserInfo.tsx
web/src/pages/Room.tsx
web/src/components/room/UserInfo.tsx
0 → 100644
View file @
22c92d1
import React from 'react';
import { User } from './types';
import { UserStatus } from './UserStatus';
interface UserInfoProps {
users: User[];
}
export const UserInfo: React.FC<UserInfoProps> = ({ users }) => {
return (
<div className='w-7/12 h-60 flex justify-center'>
{users.map((user) => (<UserStatus user={user} />))}
</div>
);
}
\ No newline at end of file
web/src/pages/Room.tsx
View file @
22c92d1
...
...
@@ -6,6 +6,8 @@ import { Canvas } from '../components/room/Canvas';
import { Chat } from '../components/room/Chat';
import { RoomInfo } from '../components/room/RoomInfo';
import { RoomData, UpdateRoomUser } from '../components/room/types';
import { UserInfo } from '../components/room/UserInfo';
import { UserStatus } from '../components/room/UserStatus';
import SocketContext from '../contexts/SocketContext';
interface RoomLocation {
...
...
@@ -87,8 +89,9 @@ export const Room: React.FC = () => {
<Chat w='w-4/12' h='h-80' />
</div>
) : (
<div className='w-full flex justify-center'>
<Chat w='w-9/12' h='h-96' />
<div className='w-full flex flex-col justify-center items-center'>
<UserInfo users={roomData.users}/>
<Chat w='w-7/12' h='h-96' />
</div>
)
}
...
...
Please
register
or
login
to post a comment