From 777b0f700067d7ffde37fbe14ed320f2ef630330 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 25 Jun 2025 21:40:54 +0200 Subject: refactor: improved type-safety, removal of any from all instances --- apps/web/src/app/contributors/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/web/src/app/contributors') diff --git a/apps/web/src/app/contributors/page.tsx b/apps/web/src/app/contributors/page.tsx index f5fa0755..38d6c0d8 100644 --- a/apps/web/src/app/contributors/page.tsx +++ b/apps/web/src/app/contributors/page.tsx @@ -49,7 +49,7 @@ async function getContributors(): Promise { const contributors = await response.json(); const filteredContributors = contributors.filter( - (contributor: any) => contributor.type === "User" + (contributor: Contributor) => contributor.type === "User" ); return filteredContributors; -- cgit v1.3.1 From e1481391c7659878614a47dd92153c31fdbf1e52 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 25 Jun 2025 21:43:34 +0200 Subject: refactor: update contributors display to show top two contributors --- apps/web/src/app/contributors/page.tsx | 87 ++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 41 deletions(-) (limited to 'apps/web/src/app/contributors') diff --git a/apps/web/src/app/contributors/page.tsx b/apps/web/src/app/contributors/page.tsx index 38d6c0d8..67a4ff5a 100644 --- a/apps/web/src/app/contributors/page.tsx +++ b/apps/web/src/app/contributors/page.tsx @@ -61,8 +61,8 @@ async function getContributors(): Promise { export default async function ContributorsPage() { const contributors = await getContributors(); - const topContributor = contributors[0]; - const otherContributors = contributors.slice(1); + const topContributors = contributors.slice(0, 2); + const otherContributors = contributors.slice(2); return (
@@ -105,54 +105,59 @@ export default async function ContributorsPage() {
- {topContributor && ( + {topContributors.length > 0 && (

- Top Contributor + Top Contributors

Leading the way in contributions

- -
-
- - -
- - - - {topContributor.login.charAt(0).toUpperCase()} - - -
- 1 -
-
-

- {topContributor.login} -

-
- - {topContributor.contributions} - - contributions -
-
-
-
- +
+ {topContributors.map((contributor, index) => ( + +
+
+ + +
+ + + + {contributor.login.charAt(0).toUpperCase()} + + +
+ {index + 1} +
+
+

+ {contributor.login} +

+
+ + {contributor.contributions} + + contributions +
+
+
+
+ + ))} +
)} -- cgit v1.3.1 From ef806ceab82e0077651c9431cab8d6774af2a316 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 25 Jun 2025 21:49:02 +0200 Subject: refactor: use badge component from shadcn --- apps/web/src/app/contributors/page.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/web/src/app/contributors') diff --git a/apps/web/src/app/contributors/page.tsx b/apps/web/src/app/contributors/page.tsx index 67a4ff5a..af260741 100644 --- a/apps/web/src/app/contributors/page.tsx +++ b/apps/web/src/app/contributors/page.tsx @@ -6,6 +6,7 @@ import { Button } from "@/components/ui/button"; import { ExternalLink } from "lucide-react"; import Link from "next/link"; import { GithubIcon } from "@/components/icons"; +import { Badge } from "@/components/ui/badge"; export const metadata: Metadata = { title: "Contributors - OpenCut", @@ -77,10 +78,10 @@ export default async function ContributorsPage() {
-
+ Open Source -
+

Contributors

-- cgit v1.3.1 From e7dabd1444a2dd6854b08487d795fe08cdf4dd0e Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 25 Jun 2025 22:52:28 +0200 Subject: style: change hover effect for consistency --- apps/web/src/app/contributors/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/web/src/app/contributors') diff --git a/apps/web/src/app/contributors/page.tsx b/apps/web/src/app/contributors/page.tsx index af260741..67957c32 100644 --- a/apps/web/src/app/contributors/page.tsx +++ b/apps/web/src/app/contributors/page.tsx @@ -173,7 +173,7 @@ export default async function ContributorsPage() {

-
+
{otherContributors.map((contributor, index) => ( -
- +
+