thread-master/docs/product/haixun-console/tasks/T005-router-placeholders.md

50 lines
904 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# T005 — Router + route table + placeholder pages
> Status: `done`
> Milestone: `M1`
> Est. change: `~150 lines`
> Completed: 2026-07-09
## Goal
React Router path 路由就緒;各 `/app/*` 有占位頁。
## Depends on
- T004
## Inputs
- Spec §5.2 路由表
- 依賴:`react-router-dom`
## Outputs
### 程式變更
| 路徑 | 動作 | 說明 |
|------|------|------|
| `apps/web/src/App.tsx` | edit | BrowserRouter routes |
| `apps/web/src/pages/LoginPage.tsx` | add | 占位 |
| `apps/web/src/pages/TodayPage.tsx` 等 | add | 各入口占位 |
| `apps/web/src/pages/jobs/*` | add | 可選二級占位 |
### 行為變更
- `/login`、`/app/today`… 可直連
- `/app` redirect → `/app/today`
## Out of scope
- Auth guardT006
- 業務內容
## Acceptance
- [ ] 手動點導覽可切頁無 404
- [ ] `npm run build` 通過
```bash
cd apps/web && npm run build
```