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:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9bad068dead67dcb6545652281c30983db6da1cf
9bad068d
1 parent
d8834f11
Builds for 1 pipeline
failed
in 1 minute 18 seconds
불필요한 테스트 코드 삭제
Changes
1
Builds
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
19 deletions
web/src/pages/Rooms.tsx
web/src/pages/Rooms.tsx
View file @
9bad068
...
...
@@ -9,24 +9,6 @@ export const Rooms: React.FC = () => {
const socket = useContext(SocketContext);
const [ rooms, setRooms ] = useState<Room[]>([]);
// for test
const testingRoom1: Room = {
uuid: '23525',
name: 'Hello World!',
currentUsers: 3,
maxUsers: 4
}
const testingRoom2: Room = {
uuid: '235252134',
name: 'Bonjour World!',
currentUsers: 6,
maxUsers: 6
}
useEffect(() => {
setRooms([testingRoom1, testingRoom2]);
// refreshRooms()
}, []);
const refreshRooms = () => {
socket.emit(MessageType.ROOM_LIST_REQUEST, (response: MessageResponse<Room[]>) => {
if (response.ok) {
...
...
@@ -38,7 +20,7 @@ export const Rooms: React.FC = () => {
});
}
//
useEffect(refreshRooms, []);
useEffect(refreshRooms, []);
return (
<Main>
...
...
Please
register
or
login
to post a comment