mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-29 15:10:06 +00:00
fix lang
This commit is contained in:
12
lib/lang.js
12
lib/lang.js
@@ -121,14 +121,4 @@ export const redirectUserLang = (lang, pageId) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前 Next.js 路由下的 locale
|
||||
* @returns 当前路由下的 locale
|
||||
*/
|
||||
export function getCurrentLang() {
|
||||
const router = useRouter()
|
||||
let currentLang = router.locale
|
||||
return currentLang
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user