From 474c74680deae020de21f5e034035073e9712723 Mon Sep 17 00:00:00 2001 From: Connor Brathwaite Date: Sun, 7 Jan 2018 03:27:02 -0500 Subject: [PATCH] fix(GlobalFooter): manually define link item keys (#586) --- src/components/GlobalFooter/demo/basic.md | 8 ++++++-- src/components/GlobalFooter/index.js | 2 +- src/layouts/BasicLayout.js | 5 ++++- src/layouts/UserLayout.js | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/GlobalFooter/demo/basic.md b/src/components/GlobalFooter/demo/basic.md index d5061709..7662fa9f 100644 --- a/src/components/GlobalFooter/demo/basic.md +++ b/src/components/GlobalFooter/demo/basic.md @@ -11,12 +11,16 @@ import GlobalFooter from 'ant-design-pro/lib/GlobalFooter'; import { Icon } from 'antd'; const links = [{ + key: '帮助', title: '帮助', href: '', }, { - title: '隐私', - href: '', + key: 'github' + title: , + href: 'https://github.com/ant-design/ant-design-pro', + blankTarget: true, }, { + key: '条款', title: '条款', href: '', blankTarget: true, diff --git a/src/components/GlobalFooter/index.js b/src/components/GlobalFooter/index.js index 32b852fa..36abafca 100644 --- a/src/components/GlobalFooter/index.js +++ b/src/components/GlobalFooter/index.js @@ -11,7 +11,7 @@ export default ({ className, links, copyright }) => {
{links.map(link => ( diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 83d3552f..2df22a33 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -184,14 +184,17 @@ class BasicLayout extends React.PureComponent {
, href: 'https://github.com/ant-design/ant-design-pro', blankTarget: true, }, { + key: 'Ant Design', title: 'Ant Design', href: 'http://ant.design', blankTarget: true, diff --git a/src/layouts/UserLayout.js b/src/layouts/UserLayout.js index 41da648e..8402341e 100644 --- a/src/layouts/UserLayout.js +++ b/src/layouts/UserLayout.js @@ -11,9 +11,11 @@ const links = [{ title: '帮助', href: '', }, { + key: '隐私', title: '隐私', href: '', }, { + key: '隐私', title: '条款', href: '', }]; -- GitLab