refactor(investor): rename sidebar nav items and routes#66
refactor(investor): rename sidebar nav items and routes#66JoelVR17 merged 1 commit intoTrustless-Work:developfrom
Conversation
|
@andreMD287 is attempting to deploy a commit to the Trustless Work Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughNavigation labels and routes updated across sidebar and ROI dashboard components. "Manage Campaigns" label renamed to "Campaigns" in two files, and the ROI dashboard secondary navigation item redirected from "/roi" to "/my-investments" with label updated to "My investments". Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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)
apps/investor-tokenization/src/components/shared/Sidebar.tsx (1)
15-24:⚠️ Potential issue | 🟠 MajorUpdate the second sidebar item to the renamed route.
This array still points to
/roiwith labelROI, while the shell nav and the new app route use/my-investments. As written, this sidebar will send users to the removed route and never highlight the new page correctly.🔧 Proposed fix
const links: SidebarLink[] = [ { href: "/campaigns", label: "Campaigns", icon: <Megaphone className="h-4 w-4" />, }, { - href: "/roi", - label: "ROI", + href: "/my-investments", + label: "My investments", icon: <LineChart className="h-4 w-4" />, }, ];🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/investor-tokenization/src/components/shared/Sidebar.tsx` around lines 15 - 24, The second entry in the links array (type SidebarLink) still points to href "/roi" with label "ROI" so update that object to use the new route and label used by the shell and app: set href to "/my-investments" and change label to "My Investments" (keep the existing LineChart icon if desired) so the sidebar navigates to and highlights the new page correctly.
🧹 Nitpick comments (1)
apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx (1)
13-16: Consider making the investor nav a single shared config.
ROI_NAV_ITEMSandapps/investor-tokenization/src/components/shared/Sidebar.tsxcurrently model the same navigation in parallel, and this PR already shows how easily they can drift. Moving the nav definition into onesrc/features/roimodule and consuming it from both places would make future route/label renames much safer.Based on learnings: Applies to apps/{backoffice-tokenization,investor-tokenization}/**/*.{ts,tsx} : Organize Next.js frontends using feature-based folder structure in
src/features/.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx` around lines 13 - 16, ROI_NAV_ITEMS is defined in roi-dashboard-shell.tsx but the same navigation is duplicated in components/shared/Sidebar.tsx; extract a single shared nav config (e.g., export const ROI_NAV_ITEMS or NAV_ITEMS) into a new module under src/features/roi (for example index or nav.ts), update roi-dashboard-shell.tsx to import that exported constant instead of defining it locally, and update Sidebar.tsx to import the same constant so both components consume the single source of truth; ensure the exported structure includes href, label, and icon so existing usages (ROI_NAV_ITEMS, Sidebar) continue to work without other code changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@apps/investor-tokenization/src/components/shared/Sidebar.tsx`:
- Around line 15-24: The second entry in the links array (type SidebarLink)
still points to href "/roi" with label "ROI" so update that object to use the
new route and label used by the shell and app: set href to "/my-investments" and
change label to "My Investments" (keep the existing LineChart icon if desired)
so the sidebar navigates to and highlights the new page correctly.
---
Nitpick comments:
In `@apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx`:
- Around line 13-16: ROI_NAV_ITEMS is defined in roi-dashboard-shell.tsx but the
same navigation is duplicated in components/shared/Sidebar.tsx; extract a single
shared nav config (e.g., export const ROI_NAV_ITEMS or NAV_ITEMS) into a new
module under src/features/roi (for example index or nav.ts), update
roi-dashboard-shell.tsx to import that exported constant instead of defining it
locally, and update Sidebar.tsx to import the same constant so both components
consume the single source of truth; ensure the exported structure includes href,
label, and icon so existing usages (ROI_NAV_ITEMS, Sidebar) continue to work
without other code changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d50b726d-a342-41b8-babe-153f93d14f43
📒 Files selected for processing (4)
apps/investor-tokenization/src/app/my-investments/layout.tsxapps/investor-tokenization/src/app/my-investments/page.tsxapps/investor-tokenization/src/components/shared/Sidebar.tsxapps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx
Summary
/roi→/my-investmentsapp/roi/and addedapp/my-investments/with layout and pageFiles changed
apps/investor-tokenization/src/features/roi/roi-dashboard-shell.tsx— Updated nav items (Campaigns, My investments) and route (/my-investments)apps/investor-tokenization/src/components/shared/Sidebar.tsx— Updated labels and routes for consistencyapps/investor-tokenization/src/app/roi/— Removed (layout, page)apps/investor-tokenization/src/app/my-investments/— Added (layout, page)Summary by CodeRabbit