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 17:52:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e8f0289cd929e8dd8c1697de7834f33a9267d855
e8f0289c
1 parent
1bbaeb98
Room에서 인게임 여부에 따라 구성이 변화하도록 수정
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
web/src/pages/Room.tsx
web/src/pages/Room.tsx
View file @
e8f0289
...
...
@@ -24,6 +24,7 @@ export const Room: React.FC = () => {
maxUsers: 9,
users: []
});
const [ isInGame, setIsInGame ] = useState(false);
const handleUpdateRoomUser = useCallback((rawMessage: RawMessage) => {
if (rawMessage.type == MessageType.ROOM_USER_UPDATE) {
...
...
@@ -79,10 +80,18 @@ export const Room: React.FC = () => {
return (
<Main>
<RoomInfo roomData={roomData}/>
<div className='w-full flex'>
<Canvas />
<Chat />
</div>
{
isInGame ? (
<div className='w-full flex'>
<Canvas />
<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>
)
}
</Main>
);
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment