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 04:56:55 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b60371e7cc95fad621f4a1a9341c68061dbd2ded
b60371e7
1 parent
8be6e0af
폴더 구조 변경 관련 임포트 수정
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
web/src/App.tsx
web/src/pages/Rooms.tsx
web/src/App.tsx
View file @
b60371e
import React from 'react';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import { socket, SocketProvider } from './SocketContext';
import { Login } from './Login';
import { Rooms } from './Rooms';
import { socket, SocketProvider } from './
contexts/
SocketContext';
import { Login } from './
pages/
Login';
import { Rooms } from './
pages/
Rooms';
const App: React.FC = () => {
return (
...
...
web/src/pages/Rooms.tsx
View file @
b60371e
import React, { useContext, useEffect, useState } from 'react';
import { RouteComponentProps } from 'react-router';
import { Footer } from '../components/common/Footer';
import { MessageResponse, MessageType } from '../components/common/types';
import { Room } from '../components/rooms/types';
import SocketContext from '../contexts/SocketContext';
interface Room {
uuid: string;
name: string;
currentUsers: number;
maxUsers: number;
}
export const Rooms: React.FC<RouteComponentProps> = ({ history }) => {
const socket = useContext(SocketContext);
const [ rooms, setRooms ] = useState<Room[]>([]);
...
...
@@ -33,7 +28,7 @@ export const Rooms: React.FC<RouteComponentProps> = ({ history }) => {
<div className='flex items-center'>
<div>room test</div>
</div>
<
footer>footer footer</footer
>
<
Footer /
>
</div>
)
}
...
...
Please
register
or
login
to post a comment