Skip to content

Commit

Permalink
fix(sidebar): fix key warning
Browse files Browse the repository at this point in the history
  • Loading branch information
RobsonOlv committed Apr 28, 2022
1 parent fe8d0ab commit 9dae009
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const Sidebar = () => {

const SideBarIcon = (iconElement: DocDataElement | UpdatesDataElement) => {
return (
<Link href={iconElement.link} key={`sidebar-icon-${iconElement.title}`}>
<Link href={iconElement.link}>
<a
onClick={() => {
setActiveSectionName(iconElement.title)
Expand Down Expand Up @@ -252,12 +252,18 @@ const Sidebar = () => {
<Flex sx={styles.sidebarIcons}>
<Flex sx={styles.sidebarIconsContainer}>
{docsIcons.map((docsIconElement) => (
<SideBarIcon {...docsIconElement} />
<SideBarIcon
{...docsIconElement}
key={`sidebar-icon-${docsIconElement.title}`}
/>
))}
</Flex>
<Flex sx={styles.sidebarIconsContainer}>
{notesIcons.map((notesIconElement) => (
<SideBarIcon {...notesIconElement} />
<SideBarIcon
{...notesIconElement}
key={`sidebar-icon-${notesIconElement.title}`}
/>
))}
</Flex>
</Flex>
Expand Down

0 comments on commit 9dae009

Please sign in to comment.