mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-14 20:19:35 +01:00
Remove reload on change language
This commit is contained in:
@@ -79,7 +79,7 @@ export default defineComponent({
|
||||
const $router = useRouter()
|
||||
const changeLanguage = () => useAsync(() => {
|
||||
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()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -99,7 +99,7 @@ export default defineComponent({
|
||||
const $router = useRouter()
|
||||
const changeLanguage = () => useAsync(() => {
|
||||
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()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user