diff --git a/resources/js/Shared/Layout.vue b/resources/js/Shared/Layout.vue
index c3074cd..a680784 100644
--- a/resources/js/Shared/Layout.vue
+++ b/resources/js/Shared/Layout.vue
@@ -11,7 +11,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -67,6 +67,9 @@ export default {
}
},
methods: {
+ url() {
+ return location.pathname.substr(1)
+ },
hideDropdownMenus() {
this.showUserMenu = false
},
diff --git a/resources/js/Shared/MainMenu.vue b/resources/js/Shared/MainMenu.vue
index 53a1532..45905c7 100644
--- a/resources/js/Shared/MainMenu.vue
+++ b/resources/js/Shared/MainMenu.vue
@@ -34,13 +34,16 @@ export default {
components: {
Icon,
},
+ props: {
+ url: String,
+ },
methods: {
isUrl(...urls) {
if (urls[0] === '') {
- return location.pathname.substr(1) === ''
+ return this.url === ''
}
- return urls.filter(url => location.pathname.substr(1).startsWith(url)).length
+ return urls.filter(url => this.url.startsWith(url)).length
},
},
}