<template>
    <div class="networks">
        <Network
            v-for="network in networks"
            :key="`network-${network.id}`"
            :network="network"
        />
    </div>
</template>

<script>
import Network from '../tile/network.vue';

async function mounted() {
    this.networks = await this.$store.dispatch('fetchNetworks');

    console.log(this.networks);
}

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

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