From 7635edc5708d21a56b8cc6307e8fd1e5d9860e80 Mon Sep 17 00:00:00 2001 From: jieunsse Date: Tue, 24 Feb 2026 11:19:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20addteam=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=82=AC=EC=9D=B4=EB=93=9C=EB=B0=94=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EB=B3=B4=EC=9D=B4=EA=B2=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_domain/components/AddTeamSidebarWrapper.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/(root)/addteam/_domain/components/AddTeamSidebarWrapper.tsx b/src/app/(root)/addteam/_domain/components/AddTeamSidebarWrapper.tsx index ffa80de..35227aa 100644 --- a/src/app/(root)/addteam/_domain/components/AddTeamSidebarWrapper.tsx +++ b/src/app/(root)/addteam/_domain/components/AddTeamSidebarWrapper.tsx @@ -2,9 +2,22 @@ import { useRouter } from 'next/navigation'; import { Sidebar } from '@/components/sidebar'; +import ProfileImage from '@/components/profile-img/ProfileImage'; +import { useCurrentUserQuery } from '@/shared/queries/user/useCurrentUserQuery'; export default function AddTeamSidebarWrapper() { + const { data: currentUser } = useCurrentUserQuery(); const router = useRouter(); - return router.push('/mypage')} />; + return ( + + } + profileName={currentUser?.nickname} + profileTeam={currentUser?.email} + onProfileClick={() => router.push('/mypage')} + /> + ); } From 405693aa6013c6b61670936280761f0d5f2a63f3 Mon Sep 17 00:00:00 2001 From: jieunsse Date: Tue, 24 Feb 2026 12:28:46 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=ED=8C=80=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20=ED=97=A4=EB=8D=94=20?= =?UTF-8?q?=EB=B0=8F=20=EB=84=A4=EB=B9=84=EA=B2=8C=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_domain/components/Kanban/KanbanItem.tsx | 1 - .../_domain/components/Team/TeamNavClient.tsx | 6 +- .../Team/TeamTabletHeader.module.css | 4 ++ .../components/Team/TeamTabletHeader.tsx | 12 +++- src/app/(root)/layout.tsx | 56 +++++++++++-------- 5 files changed, 50 insertions(+), 29 deletions(-) diff --git a/src/app/(root)/[teamid]/_domain/components/Kanban/KanbanItem.tsx b/src/app/(root)/[teamid]/_domain/components/Kanban/KanbanItem.tsx index b34c9a8..01a9809 100644 --- a/src/app/(root)/[teamid]/_domain/components/Kanban/KanbanItem.tsx +++ b/src/app/(root)/[teamid]/_domain/components/Kanban/KanbanItem.tsx @@ -19,7 +19,6 @@ interface KanbanItemProps { function KanbanItem({ task, onItemCheckedChange, - onCardClick, onDeleteTask, onEditTask, onUpdateTask, diff --git a/src/app/(root)/[teamid]/_domain/components/Team/TeamNavClient.tsx b/src/app/(root)/[teamid]/_domain/components/Team/TeamNavClient.tsx index 6ed8eb0..96cf5eb 100644 --- a/src/app/(root)/[teamid]/_domain/components/Team/TeamNavClient.tsx +++ b/src/app/(root)/[teamid]/_domain/components/Team/TeamNavClient.tsx @@ -1,6 +1,7 @@ 'use client'; import { useState } from 'react'; +import { useRouter } from 'next/navigation'; import { MobileHeader, MobileDrawer } from '@/components/sidebar'; import ProfileImage from '@/components/profile-img/ProfileImage'; @@ -12,15 +13,17 @@ import styles from './TeamNavClient.module.css'; export default function TeamNavClient() { const [isDrawerOpen, setIsDrawerOpen] = useState(false); const { data: currentUser } = useCurrentUserQuery(); + const router = useRouter(); const openDrawer = () => setIsDrawerOpen(true); const closeDrawer = () => setIsDrawerOpen(false); + const handleProfileClick = () => router.push('/mypage'); return ( <> {/* 태블릿 헤더 */}
- +
{/* 모바일 헤더 */} @@ -31,6 +34,7 @@ export default function TeamNavClient() { } onMenuClick={openDrawer} + onProfileClick={handleProfileClick} /> diff --git a/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.module.css b/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.module.css index 808d86d..b9c1a73 100644 --- a/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.module.css +++ b/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.module.css @@ -27,4 +27,8 @@ .profileArea { display: flex; align-items: center; + background: none; + border: none; + padding: 0; + cursor: pointer; } diff --git a/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.tsx b/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.tsx index 03d540a..f2d92d7 100644 --- a/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.tsx +++ b/src/app/(root)/[teamid]/_domain/components/Team/TeamTabletHeader.tsx @@ -10,9 +10,10 @@ import styles from './TeamTabletHeader.module.css'; type Props = { onMenuClick?: () => void; + onProfileClick?: () => void; }; -export default function TeamTabletHeader({ onMenuClick }: Props) { +export default function TeamTabletHeader({ onMenuClick, onProfileClick }: Props) { const { data: currentUser } = useCurrentUserQuery(); return ( @@ -28,9 +29,14 @@ export default function TeamTabletHeader({ onMenuClick }: Props) {
COWORKERS
-
+
+ ); } diff --git a/src/app/(root)/layout.tsx b/src/app/(root)/layout.tsx index 5322a4d..69b2c48 100644 --- a/src/app/(root)/layout.tsx +++ b/src/app/(root)/layout.tsx @@ -32,6 +32,10 @@ export default function RootLayout({ children }: { children: React.ReactNode }) const isLanding = pathname === '/'; const firstGroup = user?.memberships?.[0]?.group; + // [teamid] 페이지는 자체 모바일 헤더(TeamNavClient)를 사용하므로 root layout의 MobileHeader를 숨김 + const knownPaths = ['/', '/addteam', '/boards', '/mypage', '/history', '/list']; + const isTeamIdPage = !knownPaths.some((p) => pathname === p || pathname.startsWith(p + '/')); + const handleProfileClick = () => { if (isLoggedIn) { router.push('/mypage'); @@ -128,31 +132,35 @@ export default function RootLayout({ children }: { children: React.ReactNode }) : undefined } /> - + + ) : undefined + } + onMenuClick={() => setIsDrawerOpen(true)} + onProfileClick={handleProfileClick} + /> + setIsDrawerOpen(false)}> + } + label="자유게시판" + isActive + href="/boards" + onClick={() => setIsDrawerOpen(false)} /> - ) : undefined - } - onMenuClick={() => setIsDrawerOpen(true)} - onProfileClick={handleProfileClick} - /> - setIsDrawerOpen(false)}> - } - label="자유게시판" - isActive - href="/boards" - onClick={() => setIsDrawerOpen(false)} - /> - + + + )}
{children}
);