Skip to content

Commit

Permalink
Merge pull request #4428 from Shivam-AfA/navigation-fix
Browse files Browse the repository at this point in the history
[Navigation pane] Fixed arrangement in drop-down menu
  • Loading branch information
Shivam-AfA authored Jun 26, 2023
2 parents 98a6d47 + ebc7d2a commit 28be1be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/sections/General/Navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,12 @@ const Navigation = () => {
<Link to={menu.path} onClick={changeDropdownState} className="menu-item" activeClassName="nav-link-active">{menu.name}</Link>
<ul>
{menu.subItems !== undefined && menu.subItems.map((subItems, index) => {
const externalLinks = ["Forum", "Catalog", "Playground"];

return (
<li
key={index}
className="mobile-nav-subitem"
>
{externalLinks.includes(subItems.name) ?
{subItems.externalLink ?
<a href={subItems.path} target="_blank" onClick={ () => {
changeDropdownState();
closeDropDown();
Expand Down
6 changes: 2 additions & 4 deletions src/sections/General/Navigation/utility/ScrollspyMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ const ScrollspyMenu = ({ menuItems, ...props }) => {
<Link className="section" to={activeState.path} activeClassName="nav-link-active">{activeState.name}
</Link>
{activeState.subItems.map((subItem, i) => {
const externalLinks = ["Forum", "Catalog", "Playground"];

return (
<li key={i}>
{externalLinks.includes(subItem.name) ?
<a href={subItem.path} target="_blank" className="sub-item" rel="noreferrer">
{subItem.externalLink ?
<a href={subItem.path} target="_blank" className={subItem.sepLine && "sub-item"} rel="noreferrer">
{subItem.name}
</a>
: <Link to={subItem.path} partiallyActive={false} className={subItem.sepLine && "sub-item"} activeClassName="nav-link-active">
Expand Down
6 changes: 5 additions & 1 deletion src/sections/General/Navigation/utility/menu-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ const Data = {
{
name: "Meshery",
path: "/cloud-native-management/meshery",
sepLine: true
},
{
name: "Catalog",
path: "/catalog",
externalLink: true
},
{
name: "Docker Extension",
Expand All @@ -103,6 +105,7 @@ const Data = {
{
name: "Playground",
path: "/cloud-native-management/playground",
externalLink: true
},
{
name: "Nighthawk",
Expand Down Expand Up @@ -162,7 +165,8 @@ const Data = {
{
name: "Forum",
path: "https://discuss.layer5.io",
sepLine: true
sepLine: true,
externalLink: true
},
{
name: "Workshops",
Expand Down

0 comments on commit 28be1be

Please sign in to comment.