-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix not found 404 when route to session from speaker view #238
Fix not found 404 when route to session from speaker view #238
Conversation
Reviewer's Guide by SourceryThis pull request fixes a 404 "Not Found" error that occurred when routing to a session from the speaker view. The change modifies the URL generation for session links by incorporating the File-Level Changes
Sequence DiagramNo sequence diagram generated. Tips
|
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 @odkhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider making the default path ('/video/') configurable or environment-specific to ensure flexibility across different deployment scenarios.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 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 to tell me if it was helpful.
const publicPath = process.env.BASE_URL || '/video/'; | ||
return `${publicPath}schedule/talks/${sessionData.session.id}`; |
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.
issue (bug_risk): Consider potential issues with dynamic base URL in generateSessionLinkUrl
The change introduces a dynamic base URL, which could lead to inconsistent URL generation. Consider the following:
- Is process.env.BASE_URL guaranteed to be set in all environments?
- The fallback value '/video/' seems arbitrary. Is this intentional?
- There's a potential for double slashes in the URL if BASE_URL ends with a slash.
Summary by Sourcery
Fix the 404 error when routing to a session from the speaker view by updating the session link URL to include the correct base path.
Bug Fixes: