mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
docs: auto use Chinese mirror if in mirror (#38776)
* docs: auto use chinese mirror if in mirror * Update .dumi/theme/themeConfig.ts * Update .dumi/theme/themeConfig.ts Co-authored-by: Amumu <yoyo837@hotmail.com>
This commit is contained in:
parent
bac41780ef
commit
0c446bc9c3
@ -54,7 +54,7 @@ export default function BannerRecommends({ extras = [], icons = [] }: BannerReco
|
||||
>
|
||||
{first3.map((extra, index) => {
|
||||
if (!extra) {
|
||||
return <Skeleton />;
|
||||
return <Skeleton key={index} />;
|
||||
}
|
||||
const icon = icons.find((icon) => icon.name === extra.source);
|
||||
return (
|
||||
|
@ -1,3 +1,6 @@
|
||||
const chineseMirror =
|
||||
typeof location !== 'undefined' && location.hostname.includes('.antgroup.com');
|
||||
|
||||
export default {
|
||||
categoryOrder: {
|
||||
'Ant Design': 0,
|
||||
@ -43,7 +46,7 @@ export default {
|
||||
'Template Document': 3,
|
||||
},
|
||||
docVersions: {
|
||||
'4.x': 'https://4x.ant.design',
|
||||
'4.x': chineseMirror ? 'https://4x-ant-design.antgroup.com/' : 'https://4x.ant.design',
|
||||
'3.x': 'https://3x.ant.design',
|
||||
'2.x': 'https://2x.ant.design',
|
||||
'1.x': 'https://1x.ant.design',
|
||||
|
Loading…
Reference in New Issue
Block a user