mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
docs: fix 4x url (#46498)
This commit is contained in:
parent
b7cf72d7cb
commit
89e5c0c30b
@ -223,9 +223,11 @@ 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.includes('antgroup')) {
|
||||
window.location.href = `${urlObj.href.replace(/\/$/, '')}/`;
|
||||
urlObj.pathname = `${urlObj.pathname.replace(/\/$/, '')}/`;
|
||||
window.location.href = urlObj.toString();
|
||||
} else {
|
||||
window.location.href = urlObj.href.replace(/\/$/, '');
|
||||
}
|
||||
window.location.href = urlObj.href.replace(/\/$/, '');
|
||||
}, []);
|
||||
|
||||
const onLangChange = useCallback(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user