Skip to content
Snippets Groups Projects
Commit 088c768a authored by Manikanth Dindigala's avatar Manikanth Dindigala
Browse files

refactor: moving the method to mixin.

parent b677e4ca
No related branches found
No related tags found
1 merge request!55fix/#105: navigating from tido homepage to website
Pipeline #219183 passed
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<script> <script>
import editions from "../utilities/editionLinks"; import editions from "../utilities/editionLinks";
import pathUrl from "../mixin/pathUrl.js"
export default { export default {
data: () => ({ data: () => ({
...@@ -91,10 +92,8 @@ export default { ...@@ -91,10 +92,8 @@ export default {
{ title: 'Related Literature', to: '/relatedliterature.html' }, { title: 'Related Literature', to: '/relatedliterature.html' },
], ],
}), }),
computed: { mixins: [
getPath(){ pathUrl
return window?.location?.origin + '/' + window?.location?.pathname.replace(this.$route.path,''); ]
}
}
} }
</script> </script>
...@@ -40,16 +40,15 @@ ...@@ -40,16 +40,15 @@
</template> </template>
<script> <script>
import editionLinks from "../utilities/editionLinks"; import editionLinks from "../utilities/editionLinks";
import pathUrl from "../mixin/pathUrl.js"
export default { export default {
data: () => ({ data: () => ({
editionSyriac: editionLinks[0], editionSyriac: editionLinks[0],
editionArabic: editionLinks[1] editionArabic: editionLinks[1]
}), }),
computed: { mixins: [
getPath(){ pathUrl
return window?.location?.origin + '/' + window?.location?.pathname.replace(this.$route.path,''); ]
}
}
} }
</script> </script>
export default {
computed:{
getPath() {
return window?.location?.origin + '/' + window?.location?.pathname.replace(this.$route.path,'');
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment