Skip to content

fix: remove empty padding in mobile navbar when navItems is empty#8723

Open
veeresh8055 wants to merge 1 commit intonodejs:mainfrom
veeresh8055:fixNavBar
Open

fix: remove empty padding in mobile navbar when navItems is empty#8723
veeresh8055 wants to merge 1 commit intonodejs:mainfrom
veeresh8055:fixNavBar

Conversation

@veeresh8055
Copy link

Description

This PR fixes the issue where the mobile navigation shows empty padding when the NavBar does not contain any children.

Solution

Added a conditional check before rendering the navbar so it only renders when navigation items exist.

navItems && navItems.length > 0

This prevents the navbar container from rendering when there are no items, removing the extra empty padding in the mobile navigation.

Fixes #8719

@veeresh8055 veeresh8055 requested a review from a team as a code owner March 14, 2026 17:38
@vercel
Copy link

vercel bot commented Mar 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Mar 14, 2026 5:39pm

Request Review

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minimize empty space in Mobile Navigation

1 participant