Added top artist metric to dashboard

This commit is contained in:
r-freeman 2023-01-30 22:16:28 +00:00
parent 5ea298b05a
commit 682a8af265
2 changed files with 14 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{ {
"statsfm": { "statsfm": {
"top_genre": "modern rock" "top_genre": "Modern rock",
"top_artist": "Muse"
} }
} }

View File

@ -16,12 +16,6 @@ export async function getDashboardData() {
const {statsfm} = JSON.parse(await getLocalData()) const {statsfm} = JSON.parse(await getLocalData())
const metrics: Metric[] = [ const metrics: Metric[] = [
{
title: "Top genre",
value: statsfm.top_genre,
group: "Spotify",
href: "https://spotify.com/"
},
{ {
title: "Repos", title: "Repos",
value: totalRepos, value: totalRepos,
@ -40,6 +34,18 @@ export async function getDashboardData() {
group: "GitHub", group: "GitHub",
href: "https://github.com/r-freeman/" 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", title: "Total articles",
value: totalArticles, value: totalArticles,