We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8ec828 commit e89874eCopy full SHA for e89874e
1 file changed
generator/templates/Default/src/templates/Default.vue
@@ -1,5 +1,5 @@
1
<template>
2
- <div v-if="$store.getters['Authorisation/isLoggedIn']">
+ <div v-if="isLoggedIn">
3
<v-navigation-drawer
4
app
5
fixed
@@ -29,6 +29,7 @@
29
<script>
30
import AppBarMenu from '../components/AppBarMenu.vue';
31
import MainMenu from './../components/MainMenu.vue';
32
+import {mapGetters} from 'vuex';
33
34
export default {
35
name: 'template-default',
@@ -38,6 +39,11 @@ export default {
38
39
menu: true,
40
};
41
},
42
+ computed: {
43
+ ...mapGetters({
44
+ isLoggedIn: 'Authorisation/isLoggedIn',
45
+ }),
46
+ },
47
beforeCreate() {
48
if (!this.$store.getters['Authorisation/isLoggedIn']) {
49
this.$router.push({name: 'login'});
0 commit comments