Skip to content

Commit b0d355f

Browse files
authored
add missing key to the blog sidebar components (#4719)
1 parent f5d4596 commit b0d355f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

website/src/theme/BlogSidebar/Desktop/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import React from 'react';
8+
import React, {Fragment} from 'react';
99
import clsx from 'clsx';
1010
import Link from '@docusaurus/Link';
1111
import {translate} from '@docusaurus/Translate';
@@ -34,7 +34,7 @@ export default function BlogSidebarDesktop({sidebar}: Props) {
3434
);
3535
cachedYear = postYear;
3636
return (
37-
<>
37+
<Fragment key={item.permalink}>
3838
{yearHeader}
3939
<li key={item.permalink} className={styles.sidebarItem}>
4040
<Link
@@ -45,7 +45,7 @@ export default function BlogSidebarDesktop({sidebar}: Props) {
4545
{item.title}
4646
</Link>
4747
</li>
48-
</>
48+
</Fragment>
4949
);
5050
})}
5151
</ul>

website/src/theme/BlogSidebar/Mobile/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import React from 'react';
8+
import React, {Fragment} from 'react';
99
import Link from '@docusaurus/Link';
1010
import {NavbarSecondaryMenuFiller} from '@docusaurus/theme-common';
1111
import styles from './styles.module.css';
@@ -22,7 +22,7 @@ function BlogSidebarMobileSecondaryMenu({sidebar}: Props) {
2222
);
2323
cachedYear = postYear;
2424
return (
25-
<>
25+
<Fragment key={item.permalink}>
2626
{yearHeader}
2727
<li key={item.permalink} className="menu__list-item">
2828
<Link
@@ -33,7 +33,7 @@ function BlogSidebarMobileSecondaryMenu({sidebar}: Props) {
3333
{item.title}
3434
</Link>
3535
</li>
36-
</>
36+
</Fragment>
3737
);
3838
})}
3939
</ul>

0 commit comments

Comments
 (0)