feat: add front leaderboard
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import React from 'react';
|
||||
import './styles.scss';
|
||||
|
||||
const arrayBoard = [
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
{ date: '12/06/2014', time: '1.06' },
|
||||
];
|
||||
|
||||
const LeaderBoard = () => {
|
||||
return (
|
||||
<div className='boardContainer'>
|
||||
<p className='titleBoard'>Time Leaderboard</p>
|
||||
<div className='completeBoard'>
|
||||
<div className='lineInfo'>
|
||||
<p className='infoDate'>Day</p>
|
||||
<p className='infoScore'>Time</p>
|
||||
</div>
|
||||
|
||||
<div className='containerLittle'>
|
||||
{arrayBoard.map((item, index) => {
|
||||
return (
|
||||
<div
|
||||
className='lineBoard'
|
||||
key={index}
|
||||
>
|
||||
<p className='blockDate'>{item.date}</p>
|
||||
<p className='blockScore'>{item.time}</p>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
;
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LeaderBoard;
|
||||
@@ -0,0 +1,72 @@
|
||||
.boardContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.titleBoard {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.completeBoard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
|
||||
}
|
||||
|
||||
.containerLittle {
|
||||
overflow: scroll;
|
||||
height: 100%;
|
||||
max-height: 350px;
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.lineInfo {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
border: 1.5px solid #fff;
|
||||
border-radius: 3px;
|
||||
padding: 10px;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.infoDate {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.infoScore {
|
||||
text-align: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.lineBoard {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
border: 1.5px solid #fff;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 3px;
|
||||
padding: 5px;
|
||||
background-color: #e1e1e1;
|
||||
color: #333;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.blockScore {
|
||||
text-align: right;
|
||||
}
|
||||
Reference in New Issue
Block a user