koel/resources/assets/js/components/screens/home/MostPlayedArtists.vue

21 lines
559 B
Vue
Raw Normal View History

2022-06-10 10:47:46 +00:00
<template>
<section>
<h1>Top Artists</h1>
2022-07-12 09:05:12 +00:00
<ol v-if="artists.length" class="two-cols top-artist-list">
2022-06-10 10:47:46 +00:00
<li v-for="artist in artists" :key="artist.id">
<ArtistCard :artist="artist" layout="compact"/>
</li>
</ol>
2022-07-12 09:05:12 +00:00
<p v-else class="text-secondary">No artists found.</p>
2022-06-10 10:47:46 +00:00
</section>
</template>
<script lang="ts" setup>
import { toRef } from 'vue'
2022-06-10 10:47:46 +00:00
import { overviewStore } from '@/stores'
import ArtistCard from '@/components/artist/ArtistCard.vue'
2022-06-10 10:47:46 +00:00
const artists = toRef(overviewStore.state, 'mostPlayedArtists')
</script>