<template>
  <component :is="currentView"></component>
</template>

<script>
import { mapGetters } from 'vuex';
import HomeNoLoginView from './home/NoLoginView.vue';
import HomeLoggedInView from './home/LoggedInView.vue';

export default {
  name: 'HomeView',
  components: {
    HomeNoLoginView,
    HomeLoggedInView
  },
  computed: {
    ...mapGetters(['isLoggedIn']),
    currentView() {
      return this.isLoggedIn ? 'HomeLoggedInView' : 'HomeNoLoginView';
    }
  }
};
</script>