Browse Source

docs: update version href logic (#43144)

* docs: update version href logic

* chore: format

---------

Co-authored-by: 洋 <hetongyang@bytedance.com>
pull/43148/head
1 year ago
committed by GitHub
parent
commit
fb28fd2e15
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .dumi/theme/slots/Header/index.tsx

7
.dumi/theme/slots/Header/index.tsx

@ -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…
Cancel
Save