Skip to content

Commit

Permalink
move condition to component
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Oct 23, 2023
1 parent 74afc5d commit 0fde45f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ function NavigationGroupInternalComp<
return null;
}

if (navNodeWithChildren.sideNavStatus === 'hidden') return null;

if (unstyled) {
// No UI for unstyled groups
return children;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ export const DefaultNavigation: FC<ProjectNavigationDefinition & Props> = ({
}

if (isGroupDefinition(navNode)) {
if (navNode.sideNavStatus === 'hidden') return null;
return (
<Navigation.Group {...navNode} key={navNode.id}>
{/* Recursively build the tree */}
Expand Down

0 comments on commit 0fde45f

Please sign in to comment.