mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 15:39:45 +08:00
docs: update version href logic (#43144)
* docs: update version href logic * chore: format --------- Co-authored-by: 洋 <hetongyang@bytedance.com>
This commit is contained in:
parent
ec29ebf2c9
commit
fb28fd2e15
@ -215,11 +215,10 @@ const Header: React.FC = () => {
|
||||
}
|
||||
// Mirror url must have `/`, we add this for compatible
|
||||
const urlObj = new URL(currentUrl.replace(window.location.origin, url));
|
||||
if (urlObj.host === '3x.ant.design' || urlObj.host === '4x.ant.design') {
|
||||
window.location.href = urlObj.href.replace(/\/$/, '');
|
||||
return;
|
||||
if (urlObj.host.includes('antgroup')) {
|
||||
window.location.href = `${urlObj.href.replace(/\/$/, '')}/`;
|
||||
}
|
||||
window.location.href = `${urlObj.href.replace(/\/$/, '')}/`;
|
||||
window.location.href = urlObj.href.replace(/\/$/, '');
|
||||
}, []);
|
||||
|
||||
const onLangChange = useCallback(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user