<template>
    <div class="actors">
        <Actor
            v-for="actor in actors"
            :key="`actor-${actor.id}`"
            :actor="actor"
        />
    </div>
</template>

<script>
import Actor from '../tile/actor.vue';

async function mounted() {
    this.actors = await this.$store.dispatch('fetchActors', { limit: 1000 });
}

export default {
    components: {
        Actor,
    },
    data() {
        return {
            actors: [],
        };
    },
    mounted,
};
</script>

<style lang="scss" scoped>
.actors {
    display: grid;
    grid-template-columns: repeat(auto-fit, 10rem);
    grid-gap: 0 .5rem;
    padding: 1rem;
}
</style>
