-
Notifications
You must be signed in to change notification settings - Fork 761
Support url in conditional router #1317
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
Conversation
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.
Clean implementation adding URL context to conditional router. Code is well-structured with proper type definitions.
interface RouterContext { | ||
metadata?: Record<string, string>; | ||
params?: Record<string, any>; | ||
url?: { | ||
pathname: string; | ||
}; | ||
} |
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.
🛠️ Code Refactor
Issue: The url
property in RouterContext interface lacks JSDoc documentation explaining its purpose and usage
Fix: Add JSDoc comment to document the url property's role in conditional routing
Impact: Improves code maintainability and developer understanding
interface RouterContext { | |
metadata?: Record<string, string>; | |
params?: Record<string, any>; | |
url?: { | |
pathname: string; | |
}; | |
} | |
interface RouterContext { | |
metadata?: Record<string, string>; | |
params?: Record<string, any>; | |
/** URL information for conditional routing decisions */ | |
url?: { | |
pathname: string; | |
}; | |
} |
Description
Motivation
Type of Change
How Has This Been Tested?
Screenshots (if applicable)
Checklist
Related Issues