diff --git a/components/ForkIcon.tsx b/components/ForkIcon.tsx new file mode 100644 index 0000000..987f09f --- /dev/null +++ b/components/ForkIcon.tsx @@ -0,0 +1,10 @@ +import type {Props} from '@/types' + +export function ForkIcon(props: Props) { + return ( + + + + ) +} \ No newline at end of file diff --git a/lib/github.ts b/lib/github.ts index 6f3494d..5f39128 100644 --- a/lib/github.ts +++ b/lib/github.ts @@ -31,6 +31,7 @@ export async function getPinnedRepos() { description url stargazerCount + forkCount primaryLanguage { name color diff --git a/pages/projects.tsx b/pages/projects.tsx index a27e31d..18edb16 100644 --- a/pages/projects.tsx +++ b/pages/projects.tsx @@ -4,6 +4,7 @@ import {Card} from '@/components/Card' import {SimpleLayout} from '@/components/SimpleLayout' import {SocialLink} from '@/components/SocialLink' import {StarIcon} from '@/components/StarIcon' +import {ForkIcon} from '@/components/ForkIcon' import {getPinnedRepos} from '@/lib/github' import {numberFormat} from '@/lib/numberFormat' import type {Repo} from '@/types' @@ -50,15 +51,26 @@ export default function Projects({pinnedRepos}: { pinnedRepos: Repo[] }) { className="w-4 h-4 rounded-full order-first" style={{backgroundColor: repo.primaryLanguage.color}}/>

-

- {numberFormat(repo.stargazerCount)} - -

+
+

+ {numberFormat(repo.stargazerCount)} + +

+

+ {numberFormat(repo.forkCount)} + +

+
))} diff --git a/types/index.ts b/types/index.ts index ebd5165..a7d74ce 100644 --- a/types/index.ts +++ b/types/index.ts @@ -17,6 +17,7 @@ export type Repo = { description: string url: string stargazerCount: number + forkCount: number primaryLanguage: { name: string color: string