- {contributors.slice(0, 8).map((contributor, index) => (
-
-
-
-
@{contributor.login}
-
{contributor.contributions} contributions
-
-
- ))}
+ {contributors
+ .sort((a, b) => b.contributions - a.contributions) // Sort contributors by contributions in descending order
+ .slice(0, 5) // Limit to top 5 contributors
+ .map((contributor, index) => (
+
+
+
+
+
@{contributor.login}
+
{contributor.contributions || 0} contributions
+
+
+
+ ))}
- {contributors.length > 8 && (
+ {contributors.length > 12 && (
- +{contributors.length - 8}
+ +{contributors.length - 12} more
)}
@@ -364,15 +592,16 @@ const FloatingContributors: React.FC