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;
}
.Container {
text-align: center;
}
.App-header {
background-color: #282c34;
min-height: 100vh;
@ -20,4 +16,3 @@
.App-link {
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 './Leaderboard.css';
//const Leaderboard = ({hashmap}) => {
// var listItems = Object.keys(hashmap).map(playerName => {
@ -43,19 +44,21 @@ const Leaderboard = () => {
});
return (
<table>
<thead>
<tr>
<th>Name</th>
<th>Played</th>
<th>Won</th>
<th>Draw</th>
</tr>
</thead>
<tbody>
{ tableRows }
</tbody>
</table>
<div className="Leaderboard">
<table>
<thead>
<tr>
<th>Name</th>
<th>Played</th>
<th>Won</th>
<th>Draw</th>
</tr>
</thead>
<tbody>
{ tableRows }
</tbody>
</table>
</div>
);
};