Skip to content

Commit

Permalink
frontend update
Browse files Browse the repository at this point in the history
  • Loading branch information
gamer-1478 committed Nov 2, 2023
1 parent 2a5727a commit 61a6e29
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions react-app/src/Pages/EventQuestions/EventQuestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,28 @@ function EventQuestions() {
<h1 className='event-title'>No Subssions That Have Passed Yet</h1>
</div>)}
{data.event.leaderboard.map((item, index) => {
return (
<div className='submissions-card white'>
<div className='submissions-card-header'>
<h2>User: {item.name}</h2>
<p className='submission-card-status'>
Points: &nbsp; <div className='white'>{item.points}</div>&nbsp; &nbsp;
TimeTaken: &nbsp; <div className='white'>{((new Date(item.time) - new Date(data.event.startTime)) / 60000).toFixed(2)} Minutes</div>
</p>
</div>
<div className='submissions-card-button'>
<Button
onClick={() => { openInNewTab('/Profile/' + item.name) }}
buttonStyle='btn--primary--black'>
View Profile
</Button>
if (item.name !== "gamer1478" && item.name !== "PianoPianist" && item.name !== "FutureTonyStark") {
return (
<div className='submissions-card white'>
<div className='submissions-card-header'>
<h2>User: {item.name}</h2>
<p className='submission-card-status'>
Points: &nbsp; <div className='white'>{item.points}</div>&nbsp; &nbsp;
TimeTaken: &nbsp; <div className='white'>{((new Date(item.time) - new Date(data.event.startTime)) / 60000).toFixed(2)} Minutes</div>
</p>
</div>
<div className='submissions-card-button'>
<Button
onClick={() => { openInNewTab('/Profile/' + item.name) }}
buttonStyle='btn--primary--black'>
View Profile
</Button>
</div>
</div>
</div>
)
)
} else {
return (<></>)
}
})}
</div>
</>
Expand Down

0 comments on commit 61a6e29

Please sign in to comment.