mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-27 10:20:40 +01:00
Remove reload on change language
This commit is contained in:
@@ -79,7 +79,7 @@ export default defineComponent({
|
|||||||
const $router = useRouter()
|
const $router = useRouter()
|
||||||
const changeLanguage = () => useAsync(() => {
|
const changeLanguage = () => useAsync(() => {
|
||||||
i18n.setLocale(i18n.locale === 'fr' ? 'en' : 'fr')
|
i18n.setLocale(i18n.locale === 'fr' ? 'en' : 'fr')
|
||||||
if ($router.currentRoute.fullPath.includes('blog') || $router.currentRoute.fullPath === '/') {
|
if ($router.currentRoute.fullPath.includes('blog')) {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default defineComponent({
|
|||||||
const $router = useRouter()
|
const $router = useRouter()
|
||||||
const changeLanguage = () => useAsync(() => {
|
const changeLanguage = () => useAsync(() => {
|
||||||
i18n.setLocale(i18n.locale === 'fr' ? 'en' : 'fr')
|
i18n.setLocale(i18n.locale === 'fr' ? 'en' : 'fr')
|
||||||
if ($router.currentRoute.fullPath.includes('blog') || $router.currentRoute.fullPath === '/') {
|
if ($router.currentRoute.fullPath.includes('blog')) {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user