Home.vue 451 Bytes
Newer Older
1
<template>
2
  <!-- Projects component -->
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
  <Projects/>
</template>

<script>
// @ is an alias to /src
import Projects from "../components/Projects";
import { mapGetters } from 'vuex'

export default {
  name: 'Home',
  components: {
    Projects
  },
  computed: {
    ...mapGetters(['isAuthenticated'])
  },
  mounted() {
    if (!this.isAuthenticated) {
      // login failed, show login page
      this.$router.push('/login')
    }
  }
}
</script>