<template>
    <div class="content">
        <FilterBar :fetch-releases="fetchReleases" />

        <div class="content-inner">
            <Releases
                :releases="releases"
            />
        </div>
    </div>
</template>

<script>
import FilterBar from '../header/filter-bar.vue';
import Releases from '../releases/releases.vue';

async function fetchReleases() {
    this.releases = await this.$store.dispatch('fetchReleases', { limit: 100 });
}

async function mounted() {
    this.pageTitle = '';

    await this.fetchReleases();
}

export default {
    components: {
        FilterBar,
        Releases,
    },
    data() {
        return {
            releases: [],
            networks: [],
            pageTitle: null,
        };
    },
    mounted,
    methods: {
        fetchReleases,
    },
};
</script>
