ヘッダーに /projects /assignees 画面へのリンクを追加して
- User
ヘッダーに
/projects/assignees画面へのリンクを追加して Assistant
The user wants to add links to
/projectsand/assigneespages in the header. Let me first read the OVERVIEW.md as required by the workspace rules, and then look at the Header component.Assistant
/projectsと/assigneesのページが存在するか確認します。Let me check if there are
/projectsand/assigneespages in the app.Assistant
既存のページ構成を確認します。
The pages don't exist yet. Let me check what pages do exist in the app directory.
Assistant
ページの存在を確認できました。
/projectsはsrc/app/(dashboard)/projects/page.tsx、/assigneesはsrc/app/(dashboard)/assignees/page.tsxに存在しています。現在のヘッダーにはロゴ、検索バー、設定アイコン、ログアウトボタン、ユーザー情報がありますが、ページナビゲーションリンクがありません。
The pages exist at
(dashboard)/projectsand(dashboard)/assignees. In Next.js,(dashboard)is a route group, so the actual URLs would be/projectsand/assignees. Let me also check if there's a layout for the dashboard route group.Now I have enough information to create the plan. The Header component needs navigation links to
/projectsand/assignees.- User
<attached_files>
<code_selection path="file:///Users/mad-tmng/.cursor/plans/%E3%83%98%E3%83%83%E3%83%80%E3%83%BC%E3%81%AB%E3%83%8A%E3%83%93%E3%83%AA%E3%83%B3%E3%82%AF%E8%BF%BD%E5%8A%A0_227306e0.plan.md" lines="1-44"> 1|--- 2|name: ヘッダーにナビリンク追加 3|overview: ヘッダーコンポーネントに
/projectsと/assigneesへのナビゲーションリンクを追加する。 4|todos: 5| - id: add-nav-links 6| content: Header.tsx にナビゲーションリンク(/projects, /assignees)を追加し、usePathname でアクティブ状態を反映する 7| status: pending 8|isProject: false 9|--- 10| 11|# ヘッダーにナビゲーションリンクを追加 12| 13|## 対象ファイル 14| 15|- src/components/layout/Header.tsx 16| 17|## 変更内容 18| 19|ロゴの右隣(検索バーの左)にナビゲーションリンクを追加する。 20| 21|### 1. lucide-react から追加アイコンをインポート 22| 23|-FolderKanban(Projects用)と (Assignees用)をインポートに追加 24| 25|### 2. ナビゲーションリンクを挿入 26| 27|ロゴ部分の の後、検索バーの前に以下のようなナビゲーションを追加する: 28| 29| 41| 42|- 現在のパスに応じてアクティブ状態のスタイルを切り替えるため、 を から追加インポートする 43|- アクティブなリンクは 、非アクティブは のスタイルを適用 44| </code_selection> Assistant
ロゴとサーチバーの間にナビゲーションリンクを挿入します。
Assistant
リントエラーなし。最終的なファイルを確認します。
Assistant
Header.tsxへの変更が完了しました。以下の修正を行いました:-
インポート追加
usePathnameをnext/navigationから追加FolderKanban,Usersアイコンをlucide-reactから追加
-
ナビゲーションリンク挿入 (ロゴと検索バーの間)
/projectsリンク(FolderKanbanアイコン付き)/assigneesリンク(Usersアイコン付き)
-
アクティブ状態のスタイリング
usePathnameで現在のパスを取得し、startsWithで該当ページにいるか判定- アクティブ時:
font-semibold text-backhub - 非アクティブ時:
text-gray-500 hover:text-gray-700
-