Skip to content

fix: show NavBar on all routes except home (#171)#197

Open
suryaprakash0010 wants to merge 1 commit intosamarsajad:mainfrom
suryaprakash0010:fix/navbar-missing-routes-171
Open

fix: show NavBar on all routes except home (#171)#197
suryaprakash0010 wants to merge 1 commit intosamarsajad:mainfrom
suryaprakash0010:fix/navbar-missing-routes-171

Conversation

@suryaprakash0010
Copy link
Copy Markdown

Fix: NavBar Missing in Routes Other Than Home

Description

Resolves #171 by implementing proper route-based layout management to ensure the NavBar is consistently displayed across all non-authentication routes.

Changes Made

  • Created MainLayout component with NavBar and Footer
  • Created AuthLayout for authentication pages (login/register/forgot-password)
  • Updated routing structure to use appropriate layouts
  • Removed duplicate NavBar/Footer from HomePage
  • Made emergency panel globally accessible
  • Ensured consistent dark mode theming

Technical Details

  • Implemented React Router nested routes with Outlet
  • Centralized dark mode state management
  • Improved component structure and separation of concerns
  • Added proper TypeScript types

Testing

  • Verified NavBar visibility on all non-auth routes
  • Confirmed NavBar is hidden on auth pages
  • Tested dark mode consistency
  • Verified emergency panel functionality
  • Checked mobile responsiveness

Related Issues

Checklist

  • NavBar appears on all non-auth routes
  • No duplicate NavBars/Footers
  • Dark mode works consistently
  • Emergency panel functions correctly
  • Code follows project conventions

Notes

  • Improves navigation consistency
  • More maintainable layout structure
  • Better separation of concerns
  • Easier to add new routes with proper layouts

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 12, 2025

@suryaprakash0010 is attempting to deploy a commit to the Samar Sajad's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link
Copy Markdown

netlify bot commented Dec 12, 2025

👷 Deploy request for mc-hospital-management pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3c9d048

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.

Missing NavBar in routes other than home

1 participant