<template>
  <List>
    <ListItem v-for="item in series" :key="item.id" :title="item.name" :thumbnail="item.thumbnail" :action="'/series/' + item.id"/>
  </List>
</template>

<script>
import API from '@/api-client.js'
import List from '@/components/List'
import ListItem from '@/components/ListItem'

export default {
  name: 'SeriesList',
  components: {
    List,
    ListItem
  },
  data () {
    return {
      series: []
    }
  },
  mounted () {
    API.listSeries(series => (this.series = series))
  }
}
</script>
