forked from CS3219-AY2324S1/ay2324s1-course-assessment-g32
-
Notifications
You must be signed in to change notification settings - Fork 0
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 CS3219-AY2324S1#255 from CS3219-AY2324S1/dev-lhy
Bugfix: resolve table page length bug
- Loading branch information
Showing
5 changed files
with
30 additions
and
55 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
export { default as QuestionList } from './QuestionList'; | ||
export { default as QuestionContent } from './QuestionContent'; | ||
export { default as QuestionForm } from './QuestionForm'; | ||
|
||
export function renderTags(tags) { | ||
return tags?.map((tag, index) => { | ||
return ( | ||
<span key={index} className='badge bg-secondary'> | ||
{tag} | ||
</span> | ||
); | ||
}); | ||
}; | ||
|
||
export function getComplexityColor(complexity) { | ||
switch (complexity) { | ||
case 'Easy': return 'bg-success'; | ||
case 'Medium': return 'bg-warning'; | ||
case 'Hard': return 'bg-danger'; | ||
default: return 'bg-primary'; | ||
} | ||
}; |
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