mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-14 11:45:41 +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/"
|
||
|
}
|
||
|
]
|
||
|
}
|