Skip to content

Commit 75a18d8

Browse files
committed
feat: add sorting by difficulty
1 parent 496b12b commit 75a18d8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/app/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export default async function HomePage() {
1919

2020
{categories.map((cat) => {
2121
const meta = CATEGORY_META[cat as Category];
22-
const catProblems = problems.filter((p) => p.category === cat);
22+
const catProblems = problems
23+
.filter((p) => p.category === cat)
24+
.sort((a, b) => a.difficulty - b.difficulty);
2325
return (
2426
<div key={cat} className="mb-10">
2527
<h3

0 commit comments

Comments
 (0)