Skip to content

Commit

Permalink
change(megamenu): typo correction and key setting on list.items
Browse files Browse the repository at this point in the history
  • Loading branch information
ichim-david committed Jun 10, 2022
1 parent 468acc3 commit 96d2c4f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/ui/Header/HeaderMenuPopUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Icon,
Accordion,
} from 'semantic-ui-react';
// import cx from 'classnames';
import { useClickOutside } from '@eeacms/volto-eea-design-system/helpers';

const createColumns = (item, length) => {
Expand Down Expand Up @@ -48,7 +47,7 @@ const Item = ({ item, icon = false, iconName }) => (
</a>
<List className="menu-list">
{item.items.map((listItem) => (
<List.Item key={listItem['@id']} as="a" href={listItem.hreg}>
<List.Item key={listItem['@id']} as="a" href={listItem.href}>
{icon && <Icon className={iconName} />}
{listItem.title}
</List.Item>
Expand Down Expand Up @@ -154,7 +153,7 @@ const SecondLevelContent = ({ element, topics = false }) => {
{item.title}
</List.Item>
))}
<List.Item as="a" href="/#">
<List.Item as="a" href="/#" key={'a-z-topics'}>
A-Z Topics
</List.Item>
</List>
Expand All @@ -163,13 +162,9 @@ const SecondLevelContent = ({ element, topics = false }) => {
content = (
<List>
{element.items.map((item) => (
<React.Fragment key={item['@id']}>
{
<List.Item as="a" href={item.href}>
{item.title}
</List.Item>
}
</React.Fragment>
<List.Item as="a" href={item.href} key={item['@id']}>
{item.title}
</List.Item>
))}
</List>
);
Expand Down

0 comments on commit 96d2c4f

Please sign in to comment.