diff --git a/lib/dashboard.ts b/lib/dashboard.ts index ab083bb..078e792 100644 --- a/lib/dashboard.ts +++ b/lib/dashboard.ts @@ -16,6 +16,18 @@ export async function getDashboardData() { const {statsfm} = JSON.parse(await getLocalData()) const metrics: Metric[] = [ + { + title: "Top genre", + value: statsfm.top_genre, + group: "Spotify", + href: "https://spotify.com/" + }, + { + title: "Top artist", + value: statsfm.top_artist, + group: "Spotify", + href: "https://spotify.com/" + }, { title: "Repos", value: totalRepos, @@ -34,18 +46,6 @@ export async function getDashboardData() { group: "GitHub", href: "https://github.com/r-freeman/" }, - { - title: "Top genre", - value: statsfm.top_genre, - group: "Spotify", - href: "https://spotify.com/" - }, - { - title: "Top artist", - value: statsfm.top_artist, - group: "Spotify", - href: "https://spotify.com/" - }, { title: "Total articles", value: totalArticles, @@ -57,8 +57,7 @@ export async function getDashboardData() { value: totalArticleViews, group: "Website", href: "/writing" - }, - + } ] // sort metrics into named groups