The dashboard module currently renders all content within a single flat page.tsx at /dashboard. While a layout.tsx exists with a Sidebar and TopNav, the sidebar navigation links (/dashboard/savings-pools, /dashboard/staking, /dashboard/analytics, /dashboard/governance, /dashboard/settings) point to routes that do not have corresponding page files, resulting in 404s when navigated to.
The dashboard needs to be restructured to follow the Next.js App Router nested layout & routing pattern, where each sidebar link maps to its own route segment rendered dynamically within the shared dashboard layout.
Current State
app/dashboard/
├── dashboard.css
├── layout.tsx ← exists, renders Sidebar + TopNav + {children}
└── page.tsx ← single monolithic page, all dashboard content lives here
- The
Sidebar component defines navigation links to 5 sub-routes, but none of these routes exist as folders/pages.
- Navigating to any sub-route (e.g.,
/dashboard/savings-pools) results in a 404.
- All dashboard widgets (
NetWorthCard, QuickActionsGrid, ActivePoolList) are hardcoded inside the single page.tsx.
Expected State
app/dashboard/
├── layout.tsx ← shared layout (Sidebar + TopNav) — already exists
├── page.tsx ← overview/home content for /dashboard
├── savings-pools/
│ └── page.tsx ← content for /dashboard/savings-pools
├── staking/
│ └── page.tsx ← content for /dashboard/staking
├── analytics/
│ └── page.tsx ← content for /dashboard/analytics
├── governance/
│ └── page.tsx ← content for /dashboard/governance
└── settings/
└── page.tsx ← content for /dashboard/settings
Implementation Steps
-
Create route folders for each sidebar link under app/dashboard/:
savings-pools/page.tsx
staking/page.tsx
analytics/page.tsx
governance/page.tsx
settings/page.tsx
-
Add a placeholder page component in each new route file. Each should export a default React component with a descriptive heading (e.g., "Savings Pools") so the route is navigable and renders within the existing dashboard layout.
-
Keep app/dashboard/page.tsx as the overview/home view (/dashboard). No changes needed here — it already renders the main dashboard widgets.
-
Verify the existing layout.tsx correctly wraps all child routes. The current implementation already renders {children}, so it should work out of the box.
-
Test navigation: Clicking each sidebar link should render the corresponding sub-page inside the dashboard layout (Sidebar + TopNav persist, content area updates).
Acceptance Criteria
The dashboard module currently renders all content within a single flat
page.tsxat/dashboard. While alayout.tsxexists with aSidebarandTopNav, the sidebar navigation links (/dashboard/savings-pools,/dashboard/staking,/dashboard/analytics,/dashboard/governance,/dashboard/settings) point to routes that do not have corresponding page files, resulting in 404s when navigated to.The dashboard needs to be restructured to follow the Next.js App Router nested layout & routing pattern, where each sidebar link maps to its own route segment rendered dynamically within the shared dashboard layout.
Current State
Sidebarcomponent defines navigation links to 5 sub-routes, but none of these routes exist as folders/pages./dashboard/savings-pools) results in a 404.NetWorthCard,QuickActionsGrid,ActivePoolList) are hardcoded inside the singlepage.tsx.Expected State
Implementation Steps
Create route folders for each sidebar link under
app/dashboard/:savings-pools/page.tsxstaking/page.tsxanalytics/page.tsxgovernance/page.tsxsettings/page.tsxAdd a placeholder page component in each new route file. Each should export a default React component with a descriptive heading (e.g.,
"Savings Pools") so the route is navigable and renders within the existing dashboard layout.Keep
app/dashboard/page.tsxas the overview/home view (/dashboard). No changes needed here — it already renders the main dashboard widgets.Verify the existing
layout.tsxcorrectly wraps all child routes. The current implementation already renders{children}, so it should work out of the box.Test navigation: Clicking each sidebar link should render the corresponding sub-page inside the dashboard layout (Sidebar + TopNav persist, content area updates).
Acceptance Criteria
/dashboardroute still renders the current overview widgets.