From 41d0971ebd4626f617316f3cbec6de2d3b41bd14 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 13 Nov 2019 11:33:10 +0300 Subject: [PATCH 1/3] fix(v2): remove invalid attributes of footer links --- .../src/theme/Footer/index.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/index.js b/packages/docusaurus-theme-classic/src/theme/Footer/index.js index f0c41400cfb6..de64b4c03a2a 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/index.js +++ b/packages/docusaurus-theme-classic/src/theme/Footer/index.js @@ -13,22 +13,21 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useBaseUrl from '@docusaurus/useBaseUrl'; import styles from './styles.module.css'; -function FooterLink({item}) { - const toUrl = useBaseUrl(item.to); +function FooterLink({to, href, label}) { + const toUrl = useBaseUrl(to); return ( - {item.label} + {label} ); } @@ -77,7 +76,7 @@ function Footer() { /> ) : (
  • - +
  • ), )} From 39fbdc60dc1b2abb443aff4455611328bb7798cc Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 13 Nov 2019 12:00:02 +0300 Subject: [PATCH 2/3] Add rest props --- packages/docusaurus-theme-classic/src/theme/Footer/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/index.js b/packages/docusaurus-theme-classic/src/theme/Footer/index.js index de64b4c03a2a..ac1f669bdd0f 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/index.js +++ b/packages/docusaurus-theme-classic/src/theme/Footer/index.js @@ -13,11 +13,12 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useBaseUrl from '@docusaurus/useBaseUrl'; import styles from './styles.module.css'; -function FooterLink({to, href, label}) { +function FooterLink({to, href, label, ...props}) { const toUrl = useBaseUrl(to); return ( Date: Wed, 13 Nov 2019 12:07:10 +0300 Subject: [PATCH 3/3] Fix override props --- packages/docusaurus-theme-classic/src/theme/Footer/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/index.js b/packages/docusaurus-theme-classic/src/theme/Footer/index.js index ac1f669bdd0f..2a1b88151a17 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/index.js +++ b/packages/docusaurus-theme-classic/src/theme/Footer/index.js @@ -18,7 +18,6 @@ function FooterLink({to, href, label, ...props}) { return ( + })} + {...props}> {label} );