20 lines
1.7 KiB
Markdown
20 lines
1.7 KiB
Markdown
# 0025 The investor's dashboard is a tabbed section, one route per tab
|
||
|
||
Status: Proposed · Area: architecture · Date: 2026-10-07 · Decided by: agent
|
||
|
||
## Context
|
||
U8 ۴.۱, ۶.۱ and U2 draw the investor's داشبورد as three sections («اشتراکها» · «تراکنشها» · «دنبالشدهها») under one 48px tab row, which stays live while a section loads; S1 makes each section its own Suspense. The creator's داشبورد (pricing, finance) has other tabs and lives under the same `/dashboard` path.
|
||
|
||
## Decision
|
||
- Each section is its own route (`ROUTES.dashboard.subscriptions`, `.transactions`, `.following`), so a section can be linked, reloaded and loaded on its own.
|
||
- The sections sit in the route group `dashboard/(investor)`. Its layout holds the frame: on mobile the tab top bar «داشبورد», on desktop the «داشبورد» heading in the 640 column, then `DashboardTabs` (island `TabLinks`, active from the URL). Each section page brings its own `loading.tsx` with the list skeleton only.
|
||
- A section renders in the browser behind `AuthGuard role="investor"` and its part boundary; the frame and the tabs render on the server for every visitor.
|
||
|
||
## Alternatives
|
||
- One page with tab state: rejected; the URL would not say which section is open, and every section's code would load with the first.
|
||
- Tabs inside each page: rejected; the row would unmount on every switch, and each loading would repeat it.
|
||
|
||
## Consequences
|
||
- A creator who opens an investor section sees the tabs over the no-access state.
|
||
- The subscriptions and transactions tabs link to routes that are still placeholders (`(investor)/subscriptions`, `(investor)/transactions`); they 404 until built.
|