Skip to content

Commit 8b747a7

Browse files
authored
Merge pull request #2 from kritisoni19/master
add home comp and fix UI issue
2 parents 86c02d9 + f7cd731 commit 8b747a7

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

src/Home.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from "react";
2+
3+
function Home(){
4+
return(
5+
<>
6+
<h2 style={{color:'red',color: '#ffaa09', fontSize: '40px', fontWeight: '900',textAlign:'center'}}> Let's Play!</h2>
7+
</>
8+
)
9+
}
10+
11+
export default Home;

src/index.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
body {
22
font: 14px "Century Gothic", Futura, sans-serif;
33
margin-top: 130px;
4-
margin-left: 520px;
54
background-image: url(image/ppp.jpg);
65
background-position: center;
76
background-repeat: no-repeat;
@@ -24,6 +23,8 @@ ul {
2423
font-size: 40px;
2524
color: white;
2625
font-weight: 800;
26+
background: black;
27+
padding: 10px;
2728
}
2829

2930
.square {
@@ -85,6 +86,10 @@ ul {
8586
.game {
8687
display: flex;
8788
flex-direction: row;
89+
width: 500px;
90+
margin: 0 auto;
91+
align-items: center;
92+
justify-content: center;
8893
}
8994

9095
.game-info {

src/index.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import './index.css';
4+
import Home from './Home';
45

56
function Square(props) {
67
return (
@@ -107,18 +108,24 @@ class Game extends React.Component {
107108
<div className="game-board">
108109
<Board />
109110
</div>
110-
<div className="game-info">
111-
<div>{/* status */}</div>
112-
<ol>{/* TODO */}</ol>
113-
</div>
111+
{/* <div className="game-info">
112+
<div> status </div>
113+
<ol> TODO </ol>
114+
</div> */}
114115
</div>
115116
);
116117
}
117118
}
118119

120+
119121
// ========================================
120122

121123
ReactDOM.render(
122-
<Game />,
124+
<>
125+
<Home/>
126+
<Game />
127+
128+
</>
129+
,
123130
document.getElementById('root')
124131
);

0 commit comments

Comments
 (0)