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-01 19:45:46 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5b1cfd3bd5be3d5b91900968acfd79edcbc9a17c
5b1cfd3b
1 parent
695c4b57
기본 구조 컴포넌트 추가 및 적용
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
web/src/components/common/Main.tsx
web/src/pages/Login.tsx
web/src/pages/Rooms.tsx
web/src/components/common/Main.tsx
0 → 100644
View file @
5b1cfd3
import React from 'react';
import { Footer } from './Footer';
export const Main: React.FC = ({ children }) => {
return (
<div className="flex flex-col items-center w-screen h-screen">
{children}
<Footer/>
</div>
);
}
\ No newline at end of file
web/src/pages/Login.tsx
View file @
5b1cfd3
import React, { useContext, useState } from 'react';
import { RouteComponentProps } from 'react-router';
import {
Footer } from '../components/common/Footer
';
import {
Main } from '../components/common/Main
';
import { MessageResponse, MessageType } from '../components/common/types';
import SocketContext from '../contexts/SocketContext';
...
...
@@ -19,7 +19,7 @@ export const Login: React.FC<RouteComponentProps> = ({ history }) => {
}
return (
<
div className="flex flex-col items-center w-screen h-screen"
>
<
Main
>
<div className="mt-auto flex flex-col items-center">
<img className="m-7" src="./logo192.png"/>
<div>
...
...
@@ -40,7 +40,6 @@ export const Login: React.FC<RouteComponentProps> = ({ history }) => {
onClick={() => login()}>Login</button>
</div>
</div>
<Footer/>
</div>
</Main>
)
}
...
...
web/src/pages/Rooms.tsx
View file @
5b1cfd3
import React, { useContext, useEffect, useState } from 'react';
import { RouteComponentProps } from 'react-router';
import {
Footer } from '../components/common/Footer
';
import {
Main } from '../components/common/Main
';
import { MessageResponse, MessageType } from '../components/common/types';
import { RoomInfo } from '../components/rooms/RoomInfo';
import { Room } from '../components/rooms/types';
...
...
@@ -42,11 +42,10 @@ export const Rooms: React.FC<RouteComponentProps> = ({ history }) => {
// useEffect(refreshRooms, []);
return (
<
div className='flex flex-col items-center w-screen h-screen'
>
<
Main
>
<div className='mt-auto w-screen flex flex-col items-center'>
{rooms.map((room) => (<RoomInfo key={room.uuid} room={room} />))}
</div>
<Footer />
</div>
</Main>
)
}
...
...
Please
register
or
login
to post a comment