front: CordaCheckers online tgl

This commit is contained in:
djmil 2023-10-19 16:09:19 +02:00
parent c884494618
commit a16b886645
3 changed files with 9 additions and 5 deletions

View File

@ -9,14 +9,12 @@ import {
import Header from "./components/Header" import Header from "./components/Header"
import Leaderboard from "./components/Leaderboard" import Leaderboard from "./components/Leaderboard"
import GameProposal from "./components/GameProposal" import GameProposal from "./components/GameProposal"
import DataPolling from './components/OfflineToggle';
function App() { function App() {
return <div className="App"> return <div className="App">
<BrowserRouter> <BrowserRouter>
<Header/> <Header/>
<DataPolling/>
<div className="Container"> <div className="Container">
<Routes> <Routes>
<Route path="/leaderboard" element={<Leaderboard/>} /> <Route path="/leaderboard" element={<Leaderboard/>} />

View File

@ -1,3 +1,7 @@
p { h1 {
margin-bottom: 30px; display: inline-flex;
}
.OfflineToggle {
margin-left: 15px;
} }

View File

@ -1,11 +1,13 @@
import './index.css'; import './index.css';
import React from "react" import React from "react"
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import OfflineToggle from '../OfflineToggle';
export default function Header() { export default function Header() {
return <div> return <div>
<h1>CordaCheckers</h1> <h1>CordaCheckers <OfflineToggle/> </h1>
<nav> <nav>
<Link to="/leaderboard">Leaderboard</Link> {"| "} <Link to="/leaderboard">Leaderboard</Link> {"| "}
<Link to="/gameproposal">Game Proposal</Link> {"| "} <Link to="/gameproposal">Game Proposal</Link> {"| "}