front: about page
This commit is contained in:
parent
8056c38ad5
commit
6c46e8fb98
@ -1,14 +1,11 @@
|
|||||||
import './App.css';
|
import './App.css';
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {
|
import { BrowserRouter, Routes, Route } from "react-router-dom"
|
||||||
BrowserRouter,
|
|
||||||
Routes,
|
|
||||||
Route,
|
|
||||||
} from "react-router-dom"
|
|
||||||
|
|
||||||
import Header from "./components/Header"
|
import Header from "./components/Header"
|
||||||
import Leaderboard from "./components/Leaderboard"
|
import Leaderboard from "./components/Leaderboard"
|
||||||
import Game from "./components/Game"
|
import Game from "./components/Game"
|
||||||
|
import About from "./components/About"
|
||||||
import GameProposal from './components/Game/Proposal'
|
import GameProposal from './components/Game/Proposal'
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
@ -20,6 +17,7 @@ function App() {
|
|||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/leaderboard" element={<Leaderboard/>} />
|
<Route path="/leaderboard" element={<Leaderboard/>} />
|
||||||
<Route path="/game" element={<Game/>} />
|
<Route path="/game" element={<Game/>} />
|
||||||
|
<Route path="/about" element={<About/>} />
|
||||||
<Route path="/game/proposal" element={<GameProposal/>} />
|
<Route path="/game/proposal" element={<GameProposal/>} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
|
5
webapp/src/components/About/index.css
Normal file
5
webapp/src/components/About/index.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.Leaderboard {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
9
webapp/src/components/About/index.jsx
Normal file
9
webapp/src/components/About/index.jsx
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from "react"
|
||||||
|
import './index.css';
|
||||||
|
|
||||||
|
export default function Leaderboard() {
|
||||||
|
|
||||||
|
return <div className="About">
|
||||||
|
A simple american checkers game<br/>
|
||||||
|
</div>
|
||||||
|
};
|
@ -12,7 +12,6 @@ export default function Game() {
|
|||||||
// for (const [key, value] of Object.entries(data.games))
|
// for (const [key, value] of Object.entries(data.games))
|
||||||
// console.log(key, value);
|
// console.log(key, value);
|
||||||
|
|
||||||
console.log("data.games", data.games)
|
|
||||||
const waitForYou = data.games
|
const waitForYou = data.games
|
||||||
.filter(game => game.status === Status.WaitForYou)
|
.filter(game => game.status === Status.WaitForYou)
|
||||||
.map(game => {
|
.map(game => {
|
||||||
|
Loading…
Reference in New Issue
Block a user