diff --git a/resources/js/Shared/Layout.vue b/resources/js/Shared/Layout.vue
index 9848eef..ff8017b 100644
--- a/resources/js/Shared/Layout.vue
+++ b/resources/js/Shared/Layout.vue
@@ -11,7 +11,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -60,10 +60,5 @@ export default {
Logo,
MainMenu,
},
- methods: {
- url() {
- return location.pathname.substr(1)
- },
- },
}
diff --git a/resources/js/Shared/MainMenu.vue b/resources/js/Shared/MainMenu.vue
index 64932b8..907d2ea 100644
--- a/resources/js/Shared/MainMenu.vue
+++ b/resources/js/Shared/MainMenu.vue
@@ -34,16 +34,15 @@ export default {
components: {
Icon,
},
- props: {
- url: String,
- },
methods: {
isUrl(...urls) {
+ let currentUrl = this.$page.url.substr(1)
+
if (urls[0] === '') {
- return this.url === ''
+ return currentUrl === ''
}
- return urls.filter(url => this.url.startsWith(url)).length
+ return urls.filter(url => currentUrl.startsWith(url)).length
},
},
}