<template>
  <div id="app" v-if="model">
    <TopMenu v-bind:user="model.user" />
    <div class="container">
      <Main />
    </div>
  </div>
</template>

<script>
import TopMenu from './components/TopMenu.vue';
import Main from './components/Main.vue';
import { mapState } from 'vuex';

export default {
  name: 'app',
  components: {
    TopMenu,
    Main
  },
  computed: mapState({
    model: state => state.model
  }),
  mounted: function() {
    this.$store.commit('fetchGroupsModel');
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
