Commit 474c7468 authored by Connor Brathwaite's avatar Connor Brathwaite Committed by 偏右

fix(GlobalFooter): manually define link item keys (#586)

parent 662fd28c
...@@ -11,12 +11,16 @@ import GlobalFooter from 'ant-design-pro/lib/GlobalFooter'; ...@@ -11,12 +11,16 @@ import GlobalFooter from 'ant-design-pro/lib/GlobalFooter';
import { Icon } from 'antd'; import { Icon } from 'antd';
const links = [{ const links = [{
key: '帮助',
title: '帮助', title: '帮助',
href: '', href: '',
}, { }, {
title: '隐私', key: 'github'
href: '', title: <Icon type="github" />,
href: 'https://github.com/ant-design/ant-design-pro',
blankTarget: true,
}, { }, {
key: '条款',
title: '条款', title: '条款',
href: '', href: '',
blankTarget: true, blankTarget: true,
......
...@@ -11,7 +11,7 @@ export default ({ className, links, copyright }) => { ...@@ -11,7 +11,7 @@ export default ({ className, links, copyright }) => {
<div className={styles.links}> <div className={styles.links}>
{links.map(link => ( {links.map(link => (
<a <a
key={link.title} key={link.key}
target={link.blankTarget ? '_blank' : '_self'} target={link.blankTarget ? '_blank' : '_self'}
href={link.href} href={link.href}
> >
......
...@@ -184,14 +184,17 @@ class BasicLayout extends React.PureComponent { ...@@ -184,14 +184,17 @@ class BasicLayout extends React.PureComponent {
</div> </div>
<GlobalFooter <GlobalFooter
links={[{ links={[{
key: 'Pro 首页',
title: 'Pro 首页', title: 'Pro 首页',
href: 'http://pro.ant.design', href: 'http://pro.ant.design',
blankTarget: true, blankTarget: true,
}, { }, {
title: 'GitHub', key: 'github',
title: <Icon type="github" />,
href: 'https://github.com/ant-design/ant-design-pro', href: 'https://github.com/ant-design/ant-design-pro',
blankTarget: true, blankTarget: true,
}, { }, {
key: 'Ant Design',
title: 'Ant Design', title: 'Ant Design',
href: 'http://ant.design', href: 'http://ant.design',
blankTarget: true, blankTarget: true,
......
...@@ -11,9 +11,11 @@ const links = [{ ...@@ -11,9 +11,11 @@ const links = [{
title: '帮助', title: '帮助',
href: '', href: '',
}, { }, {
key: '隐私',
title: '隐私', title: '隐私',
href: '', href: '',
}, { }, {
key: '隐私',
title: '条款', title: '条款',
href: '', href: '',
}]; }];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment