We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce55e96 commit 634a681Copy full SHA for 634a681
src/components/home.tsx
@@ -54,6 +54,15 @@ export async function Home() {
54
(a, b) => HIGHLIGHTED_PLATFORMS.indexOf(a.key) - HIGHLIGHTED_PLATFORMS.indexOf(b.key)
55
);
56
57
+ // this regex deals with names like .NET that would otherwise be sorted at the top
58
+ const leadingNonAlphaRegex = /^[^\w]/;
59
+
60
+ platformList.sort((a, b) =>
61
+ (a.title ?? a.name)
62
+ .replace(leadingNonAlphaRegex, '')
63
+ .localeCompare((b.title ?? b.name).replace(leadingNonAlphaRegex, ''))
64
+ );
65
66
return (
67
<HomeClient
68
visiblePlatforms={visiblePlatforms}
0 commit comments