-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #182 from makeopensource/Remove-unnecessary-drop-d…
…own-for-assignments Remove unnecessary drop down for assignments/ course button can be pressed on anywhere
- Loading branch information
Showing
9 changed files
with
198 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
devU-client/src/components/pages/assignments/scoreboard.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@import 'variables'; | ||
|
||
.scoreboardTable { | ||
width: 100%; | ||
border-collapse: collapse; | ||
margin-top: 20px; | ||
|
||
th, td { | ||
border: 1px solid #ddd; | ||
padding: 8px; | ||
text-align: left; | ||
} | ||
|
||
th { | ||
background-color: rebeccapurple; | ||
|
||
|
||
} | ||
.scoreboardContainer { | ||
margin-top: 20px; | ||
border: 1px solid #ddd; | ||
padding: 5px; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
devU-client/src/components/pages/assignments/scoreboard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
import React from 'react'; | ||
import styles from './scoreboard.scss'; | ||
|
||
interface ScoreboardProps { | ||
courseId: string; | ||
assignmentId: string; | ||
} | ||
|
||
const Scoreboard: React.FC<ScoreboardProps> = ({ courseId, assignmentId }) => { | ||
// Dummy scoreboard data | ||
const scoreboardData = [ | ||
{ UBit: 'ashwa', score: 95, runtime: '1.2s' }, | ||
{ UBit: 'yessicaq', score: 88, runtime: '1.5s' }, | ||
{ UBit: 'neemo', score: 76, runtime: '2.1s' }, | ||
{ UBit: 'alex', score: 29, runtime: '17.2s' }, | ||
{ UBit: 'jesse', score: 56, runtime: '9.5s' }, | ||
{ UBit: 'kevin', score: 7, runtime: '100s' }, | ||
|
||
]; | ||
|
||
return ( | ||
<div> | ||
<h3>{`Scoreboard for Assignment ${assignmentId} in Course ${courseId}`}</h3> | ||
<table className={styles.scoreboardTable}> | ||
<thead> | ||
<tr> | ||
<th>UBit</th> | ||
<th>Score</th> | ||
<th>Runtime</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{scoreboardData.map((entry) => ( | ||
<tr key={entry.UBit}> | ||
<td>{entry.UBit}</td> | ||
<td>{entry.score}</td> | ||
<td>{entry.runtime}</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
); | ||
}; | ||
export default Scoreboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.