mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-09-22 19:06:16 +00:00
28 lines
730 B
TypeScript
28 lines
730 B
TypeScript
import {getTotalFollowers, getTotalRepos, getTotalStars} from '@/lib/github'
|
|
|
|
export async function dashboard() {
|
|
const [totalRepos, totalFollowers] = await Promise.all([
|
|
getTotalRepos(),
|
|
getTotalFollowers()
|
|
])
|
|
|
|
const totalStars = await getTotalStars(totalRepos)
|
|
|
|
return [
|
|
{
|
|
title: "GitHub Repos",
|
|
total: totalRepos,
|
|
href: "https://github.com/r-freeman/"
|
|
},
|
|
{
|
|
title: "GitHub Followers",
|
|
total: totalFollowers,
|
|
href: "https://github.com/r-freeman/"
|
|
},
|
|
{
|
|
title: "GitHub Stars",
|
|
total: totalStars,
|
|
href: "https://github.com/r-freeman/"
|
|
}
|
|
]
|
|
} |