front: centr align for Leaderboard

This commit is contained in:
djmil 2023-10-11 14:11:31 +02:00
parent 03b983aafd
commit 6c885bfa68
3 changed files with 22 additions and 18 deletions

View File

@ -2,10 +2,6 @@
text-align: center; text-align: center;
} }
.Container {
text-align: center;
}
.App-header { .App-header {
background-color: #282c34; background-color: #282c34;
min-height: 100vh; min-height: 100vh;
@ -20,4 +16,3 @@
.App-link { .App-link {
color: #61dafb; color: #61dafb;
} }

View File

@ -0,0 +1,6 @@
.Leaderboard {
display: flex;
justify-content: center;
align-items: center;
margin-top: 25px
}

View File

@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import './Leaderboard.css';
//const Leaderboard = ({hashmap}) => { //const Leaderboard = ({hashmap}) => {
// var listItems = Object.keys(hashmap).map(playerName => { // var listItems = Object.keys(hashmap).map(playerName => {
@ -43,19 +44,21 @@ const Leaderboard = () => {
}); });
return ( return (
<table> <div className="Leaderboard">
<thead> <table>
<tr> <thead>
<th>Name</th> <tr>
<th>Played</th> <th>Name</th>
<th>Won</th> <th>Played</th>
<th>Draw</th> <th>Won</th>
</tr> <th>Draw</th>
</thead> </tr>
<tbody> </thead>
{ tableRows } <tbody>
</tbody> { tableRows }
</table> </tbody>
</table>
</div>
); );
}; };