mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +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() {
|
export default async function ProblemsetPage() {
|
||||||
const problems = await prisma.problem.findMany({
|
const problems = await prisma.problem.findMany({
|
||||||
where: { published: true },
|
where: { published: true },
|
||||||
|
orderBy: {
|
||||||
|
id: "asc",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -60,9 +63,7 @@ export default async function ProblemsetPage() {
|
|||||||
{problem.title}
|
{problem.title}
|
||||||
</Link>
|
</Link>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell
|
<TableCell className={`py-2.5 ${getDifficultyColor(problem.difficulty)}`}>
|
||||||
className={`py-2.5 ${getDifficultyColor(problem.difficulty)}`}
|
|
||||||
>
|
|
||||||
{problem.difficulty}
|
{problem.difficulty}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
Loading…
Reference in New Issue
Block a user