-
Notifications
You must be signed in to change notification settings - Fork 3
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
#13 added active tab feature in navbar #16
Conversation
Reviewer's Guide by SourceryThis pull request implements an active tab feature in the navbar. The active tab is highlighted with a bold font and an underline. The implementation uses react-router-dom's useLocation hook to determine the current path and conditionally apply the active class to the corresponding link. Sequence diagram for navbar active tab behaviorsequenceDiagram
participant U as User
participant N as Navbar
participant R as Router
participant L as useLocation Hook
U->>N: Clicks navigation link
N->>R: Navigate to new route
N->>L: Get current location
L-->>N: Return pathname
N->>N: Compare pathname with link paths
N->>N: Apply active styles to matching link
N-->>U: Display updated navbar with active tab
Class diagram for navbar component changesclassDiagram
class Navbar {
-location: Location
+render()
}
class Link {
+to: string
+className: string
}
class Router {
}
class useLocation {
+pathname: string
}
Navbar --> Link : uses
Navbar --> useLocation : uses
Navbar --> Router : wrapped by
note for Navbar "Now uses React Router components
and tracks active state"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tanmay-s18 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Vite.React.TS.-.Google.Chrome.2025-01-31.18-20-41.mp4
Summary by Sourcery
New Features: