Skip to content

Commit 0ef360c

Browse files
committed
feat: minimize mobile nav empty space (#8719)
Only render the navItems container when the array has items to prevent an empty padded container from creating unwanted space in the mobile navigation.
1 parent a12bf9f commit 0ef360c

File tree

1 file changed

+1
-1
lines changed
  • packages/ui-components/src/Containers/NavBar

1 file changed

+1
-1
lines changed

packages/ui-components/src/Containers/NavBar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const NavBar: FC<PropsWithChildren<NavbarProps>> = ({
7575
/>
7676

7777
<div className={classNames(styles.main, `hidden peer-checked:flex`)}>
78-
{navItems && (
78+
{!!navItems?.length && (
7979
<div className={styles.navItems}>
8080
{navItems.map(({ text, link, target }) => (
8181
<NavItem

0 commit comments

Comments
 (0)