Fix Robotronics redirect and update navbar - #14
Conversation
- Fix redirect issue in robotronics.tsx using useEffect and window.location.href - Move Robotronics link to last position in navbar (after Contact) - Make Robotronics text bold in both desktop and mobile views
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Robotronics page now redirects client-side via a useEffect setting window.location.href, replacing the previous server-side next/navigation redirect, and shows a "Redirecting..." message. The spotlight navbar reorders nav items and applies bold styling to the Robotronics label/link in mobile and desktop views. ChangesRobotronics redirect and nav updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant RobotronicsPage
participant Browser
User->>RobotronicsPage: Visit /robotronics
RobotronicsPage->>User: Render "Redirecting..." message
RobotronicsPage->>Browser: useEffect sets window.location.href
Browser->>User: Navigate to robotronics-ten.vercel.app
Related Issues: None mentioned Poem ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Pull request overview
This PR fixes the /robotronics page redirect behavior in the Next.js App Router and updates the Spotlight navbar so the Robotronics link appears last and is visually emphasized.
Changes:
- Reworked
robotronicsroute to redirect on the client viauseEffectand show a brief “Redirecting…” message. - Moved the “Robotronics” navbar item to appear after “Contact”.
- Made “Robotronics” bold in both desktop and mobile navigation UIs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| rn-website/components/ui/spotlight-navbar.tsx | Reorders Robotronics nav item and applies bold styling for that item in desktop + mobile menus. |
| rn-website/app/robotronics/robotronics.tsx | Implements client-side redirect to the external Robotronics site using useEffect. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| useEffect(() => { | ||
| window.location.href = "https://robotronics-ten.vercel.app/"; | ||
| }, []); |
| className={cn( | ||
| "flex-1 text-left px-4 py-3 text-sm hover:text-white transition-colors duration-150", | ||
| item.label === "Robotronics" ? "font-bold" : "font-medium" | ||
| )} |
| "px-4 py-2 text-sm transition-colors duration-200 rounded-full", | ||
| "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-400 dark:focus-visible:ring-white/30", | ||
| item.label === "Robotronics" ? "font-bold" : "font-medium", | ||
| activeIndex === idx |
Summary by CodeRabbit