Connect, collaborate, and grow with a community of TypeScript developers
fix: sorting order was reversed on completed challanges (#1034)
Nicolas Beaussartd9b23cca68a7
diff --git a/apps/web/src/app/[locale]/explore/_components/explore-section.tsx b/apps/web/src/app/[locale]/explore/_components/explore-section.tsxindex d6b7f0f6..d2943f19 100644--- a/apps/web/src/app/[locale]/explore/_components/explore-section.tsx+++ b/apps/web/src/app/[locale]/explore/_components/explore-section.tsx@@ -70,11 +70,11 @@ export async function ExploreSection({ title, tag, redirectRoute }: SectionPropsconst bHasSubmission = b?.submission?.length && b.submission.length > 0;if (aHasSubmission && !bHasSubmission) {- return -1;+ return 1;}if (!aHasSubmission && bHasSubmission) {- return 1;+ return -1;}return difficultyToNumber[a.difficulty] !== difficultyToNumber[b.difficulty]