We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f8bd4b commit f42cb9fCopy full SHA for f42cb9f
frontend/src/components/shared/NavBar.vue
@@ -49,15 +49,24 @@ export default {
49
data() {
50
return {
51
isOpen: false,
52
+ route: null,
53
};
54
},
55
+ watch: {
56
+ $route(to) {
57
+ this.route = to.name;
58
+ },
59
60
computed: {
61
loggedIn() {
62
return this.$store.getters.getLoggedInUser;
63
64
currentRoute() {
- return this.$router.currentRoute.name;
65
+ return this.route;
66
67
68
+ beforeMount() {
69
+ this.route = this.$router.currentRoute.name;
70
71
72
</script>
0 commit comments