Browse Source

docs: Fix bisheng config & ts define

pull/21691/head
zombiej 5 years ago
parent
commit
ffb4912ecc
  1. 2
      site/bisheng.config.js
  2. 33
      site/theme/template/Layout/Footer.tsx

2
site/bisheng.config.js

@ -146,7 +146,7 @@ module.exports = {
config.plugins.push(
new webpack.DefinePlugin({
antdReproduceVersion: version,
antdReproduceVersion: JSON.stringify(version),
}),
);

33
site/theme/template/Layout/Footer.tsx

@ -49,8 +49,8 @@ class Footer extends React.Component<WrappedComponentProps> {
getColumns() {
const { intl } = this.props;
const isZhCN = intl.locale === 'zh-CN';
return [
{
const col1 = {
title: <FormattedMessage id="app.footer.resources" />,
items: [
{
@ -131,8 +131,9 @@ class Footer extends React.Component<WrappedComponentProps> {
url: 'https://ant-design.gitee.io/',
},
],
},
{
};
const col2 = {
title: <FormattedMessage id="app.footer.community" />,
items: [
{
@ -172,7 +173,11 @@ class Footer extends React.Component<WrappedComponentProps> {
url: 'https://seeconf.antfin.com/',
openExternal: true,
},
isZhCN && {
],
};
if (isZhCN) {
col2.items.push({
icon: <UsergroupAddOutlined />,
title: <FormattedMessage id="app.footer.work_with_us" />,
url: getLocalizedPathname('/docs/resources', isZhCN, {
@ -180,10 +185,10 @@ class Footer extends React.Component<WrappedComponentProps> {
enUS: 'JoinUs',
}),
LinkComponent: Link,
},
].filter(n => n),
},
{
} as any);
}
const col3 = {
title: <FormattedMessage id="app.footer.help" />,
items: [
{
@ -247,8 +252,9 @@ class Footer extends React.Component<WrappedComponentProps> {
openExternal: true,
},
],
},
{
};
const col4 = {
icon: (
<img
src="https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg"
@ -335,8 +341,9 @@ class Footer extends React.Component<WrappedComponentProps> {
},
},
],
},
];
};
return [col1, col2, col3, col4];
}
handleColorChange = (color: string) => {

Loading…
Cancel
Save