mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-29 11:20:34 +01:00
Redirect to home page when change language
This commit is contained in:
@@ -120,10 +120,8 @@ export default {
|
|||||||
this.scrollPosition = window.scrollY
|
this.scrollPosition = window.scrollY
|
||||||
},
|
},
|
||||||
async changeLanguage(lang) {
|
async changeLanguage(lang) {
|
||||||
|
await this.$router.push('/')
|
||||||
this.$i18n.setLocale(lang)
|
this.$i18n.setLocale(lang)
|
||||||
if (this.$router.currentRoute.fullPath.includes('blog')) {
|
|
||||||
await this.$router.push('/blog')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
Reference in New Issue
Block a user