Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement dynamic active link color in NavBar based on route #206

Merged
merged 3 commits into from
Oct 11, 2023
Merged

Implement dynamic active link color in NavBar based on route #206

merged 3 commits into from
Oct 11, 2023

Conversation

irohanrajput
Copy link
Contributor

Description

Updated the Navbar component to dynamically change the active link color based on the currently active route using the useLocation hook from react-router-dom. It also improves the hover effect for navigation links and refactors the code for better readability. This fix applies to small screens too, ensuring that the active link color behaves correctly on mobile views.

@Mr-Sunglasses @akshatcoder-hash

Fixes #204

Screenshot from 2023-10-08 01-53-25

Screenshot from 2023-10-08 01-52-46

@netlify
Copy link

netlify bot commented Oct 7, 2023

Deploy Preview for fossc ready!

Name Link
🔨 Latest commit e36f241
🔍 Latest deploy log https://app.netlify.com/sites/fossc/deploys/6521f05d27e00400080d0cfa
😎 Deploy Preview https://deploy-preview-206--fossc.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Mr-Sunglasses Mr-Sunglasses merged commit 510f5bd into FOSS-Community:main Oct 11, 2023
9 checks passed
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.

Issue with Navbar Active Link Color
2 participants