mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-18 15:26:36 +00:00
feat(problemset): add sorting by id in problemset page
This commit is contained in:
parent
6d61e6e783
commit
c58ed38c03
@ -26,6 +26,9 @@ const getDifficultyColor = (difficulty: Difficulty) => {
|
||||
export default async function ProblemsetPage() {
|
||||
const problems = await prisma.problem.findMany({
|
||||
where: { published: true },
|
||||
orderBy: {
|
||||
id: "asc",
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
@ -60,9 +63,7 @@ export default async function ProblemsetPage() {
|
||||
{problem.title}
|
||||
</Link>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className={`py-2.5 ${getDifficultyColor(problem.difficulty)}`}
|
||||
>
|
||||
<TableCell className={`py-2.5 ${getDifficultyColor(problem.difficulty)}`}>
|
||||
{problem.difficulty}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
Loading…
Reference in New Issue
Block a user