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-05 20:51:27 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d8834f11331cd1d52261e636f865300a5f92126a
d8834f11
1 parent
9b5f8124
RoomInfo 컴포넌트와 그 프롭을 리네임
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
web/src/components/rooms/RoomInfo.tsx → web/src/components/rooms/RoomBlock.tsx
web/src/pages/Rooms.tsx
web/src/components/rooms/Room
Info
.tsx
→
web/src/components/rooms/Room
Block
.tsx
View file @
d8834f1
...
...
@@ -5,11 +5,11 @@ import { MessageResponse, MessageType } from '../common/types';
import { RoomData } from '../room/types';
import { Room } from './types';
interface RoomProps {
interface Room
Block
Props {
room: Room
}
export const Room
Info: React.FC<Room
Props> = ({ room }) => {
export const Room
Block: React.FC<RoomBlock
Props> = ({ room }) => {
const history = useHistory();
const socket = useContext(SocketContext);
const joinRoom = () => {
...
...
web/src/pages/Rooms.tsx
View file @
d8834f1
import React, { useContext, useEffect, useState } from 'react';
import { Main } from '../components/common/Main';
import { MessageResponse, MessageType } from '../components/common/types';
import { Room
Info } from '../components/rooms/RoomInfo
';
import { Room
Block } from '../components/rooms/RoomBlock
';
import { Room } from '../components/rooms/types';
import SocketContext from '../contexts/SocketContext';
...
...
@@ -43,7 +43,7 @@ export const Rooms: React.FC = () => {
return (
<Main>
<div className='mt-auto w-screen flex flex-col items-center'>
{rooms.map((room) => (<Room
Info
key={room.uuid} room={room} />))}
{rooms.map((room) => (<Room
Block
key={room.uuid} room={room} />))}
</div>
</Main>
)
...
...
Please
register
or
login
to post a comment