Skip to content

fix: correct navbar active state for login and signup routes#778

Open
kanaklatwal wants to merge 1 commit into
aryandas2911:mainfrom
kanaklatwal:fix-navbar-active-state
Open

fix: correct navbar active state for login and signup routes#778
kanaklatwal wants to merge 1 commit into
aryandas2911:mainfrom
kanaklatwal:fix-navbar-active-state

Conversation

@kanaklatwal
Copy link
Copy Markdown

📌 Description

Fixed the navbar active state issue where the Signup button remained highlighted regardless of the current route.

The issue was caused because Login and Signup were using Link instead of NavLink, which prevented route-based active styling. Updated the implementation to use active route detection and corrected inactive styling behavior.

🔗 Related Issue

Closes #768

🛠 Changes Made

  • Replaced Link with NavLink for Login and Signup buttons
  • Added route-based active styling using isActive
  • Fixed inactive button styling so only the current route is highlighted
  • Tested behavior on /login and /signup

📸 Screenshots (if applicable)

Verified:

  • /login → only Login highlighted
  • /signup → only Signup highlighted

✅ Checklist

  • Code runs locally
  • Followed project structure
  • No console errors
  • Properly tested changes
  • Linked the issue

🚀 Notes for Reviewers

Please review the active state behavior for authentication routes and confirm UI consistency.

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.

[Bug]: Navbar active state always highlights "Signup" regardless of current route

1 participant