fix: update introduction id in docs sidebar array - #227
Conversation
line 129 Replaced the "introduction" string with an empty string in the sidebar array. This ensures the first link correctly targets the base /docs route instead of generating a non-existent /docs/introduction path, preventing 404 errors on direct navigation or page refresh.
|
@C-Schmitz-de is attempting to deploy a commit to the shauryasanyal3's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Welcome to E-VARA! 🚀 Thank you for your first pull request! We deeply appreciate your contribution to identity intelligence. A maintainer will review your code soon. |
📝 WalkthroughWalkthroughIn Docs Sidebar Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pages/Docs.tsx (1)
129-136: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winRestore the
introductionsection id here.This array now diverges from
docSections: the first button renders without a title, never becomes active for the Introduction section, andscrollToSection("")cannot targetid="introduction". If the goal is to support/docs, that routing fix needs to happen in the router/link layer, not by breaking the sidebar’s section-id mapping.Suggested fix
- {["", "authentication", "adding-identities"].map( + {["introduction", "authentication", "adding-identities"].map(🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/pages/Docs.tsx` around lines 129 - 136, Restore the section-id mapping in Docs.tsx by replacing the empty string entry in the sidebar array with the actual introduction id so it matches docSections and the section element target. Update the button rendering and scrollToSection usage to reference the Introduction section via its real id, and keep any /docs routing behavior separate from this sidebar data so active state and titles continue to resolve correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/pages/Docs.tsx`:
- Around line 129-136: Restore the section-id mapping in Docs.tsx by replacing
the empty string entry in the sidebar array with the actual introduction id so
it matches docSections and the section element target. Update the button
rendering and scrollToSection usage to reference the Introduction section via
its real id, and keep any /docs routing behavior separate from this sidebar data
so active state and titles continue to resolve correctly.
line 129 Replaced the "introduction" string with an empty string in the sidebar array. This ensures the first link correctly targets the base /docs route instead of generating a non-existent /docs/introduction path, preventing 404 errors on direct navigation or page refresh.
Summary by CodeRabbit