diff --git a/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/_ui/ChatMessageBox/index.tsx b/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/_ui/ChatMessageBox/index.tsx
index d4483e02..80af6a42 100644
--- a/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/_ui/ChatMessageBox/index.tsx
+++ b/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/_ui/ChatMessageBox/index.tsx
@@ -9,9 +9,15 @@ interface ChatMessageBoxProps {
message: ChatMessage;
currentUserId?: number; // 현재 사용자 ID
partnerNickname?: string; // 상대방 닉네임
+ isPartnerMentor?: boolean;
}
-const ChatMessageBox = ({ message, currentUserId = 1, partnerNickname = "상대방" }: ChatMessageBoxProps) => {
+const ChatMessageBox = ({
+ message,
+ currentUserId = 1,
+ partnerNickname = "상대방",
+ isPartnerMentor = false,
+}: ChatMessageBoxProps) => {
const isMine = message.senderId === Number(currentUserId);
const messageType = getMessageType(message);
@@ -83,7 +89,7 @@ const ChatMessageBox = ({ message, currentUserId = 1, partnerNickname = "상대
) : (
-
+
{partnerNickname}
diff --git a/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/index.tsx b/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/index.tsx
index 6a51670a..8d0c2ea1 100644
--- a/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/index.tsx
+++ b/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatContent/index.tsx
@@ -27,6 +27,7 @@ const ChatContent = ({ chatId }: ChatContentProps) => {
const userId = Number(parsedData?.sub ?? 0) || 0;
const isMentor = parsedData?.role === UserRole.MENTOR || parsedData?.role === UserRole.ADMIN;
+ const isPartnerMentor = !isMentor;
// 채팅 읽음 상태 업데이트 훅 진입시 자동으로
usePutChatReadHandler(chatId);
@@ -72,7 +73,7 @@ const ChatContent = ({ chatId }: ChatContentProps) => {
)}
>
-
+
{nickname}
@@ -158,6 +159,7 @@ const ChatContent = ({ chatId }: ChatContentProps) => {
message={message}
currentUserId={userId}
partnerNickname={nickname}
+ isPartnerMentor={isPartnerMentor}
/>
);
diff --git a/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatNavBar/index.tsx b/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatNavBar/index.tsx
index 36e8d107..9d172d73 100644
--- a/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatNavBar/index.tsx
+++ b/apps/web/src/app/mentor/chat/[chatId]/_ui/ChatNavBar/index.tsx
@@ -23,6 +23,7 @@ const ChatNavBar = ({ chatId }: ChatNavBarProps) => {
const accessToken = useAuthStore((state) => state.accessToken);
const result = tokenParse(accessToken);
const isMentor = result?.role === UserRole.MENTOR || result?.role === UserRole.ADMIN;
+ const isPartnerMentor = !isMentor;
// 파트너 정보 가져오기
const { data: partnerInfo } = useGetPartnerInfo(chatId);
@@ -91,7 +92,12 @@ const ChatNavBar = ({ chatId }: ChatNavBarProps) => {
-
+
{partnerInfo?.nickname || "상대방"}
{partnerInfo?.university || "예비솔커"}
@@ -136,7 +142,7 @@ const ChatNavBar = ({ chatId }: ChatNavBarProps) => {
{/* 현재 사용자 */}
-
+
{/* '나' 표시 div */}
나
@@ -150,7 +156,12 @@ const ChatNavBar = ({ chatId }: ChatNavBarProps) => {
{/* 상대방 */}
-
+
{partnerInfo?.nickname || "상대방"} ({isMentor ? "멘티" : "멘토"})
diff --git a/apps/web/src/app/mentor/chat/_ui/ChatPageClient/index.tsx b/apps/web/src/app/mentor/chat/_ui/ChatPageClient/index.tsx
index f93cf2b4..2f4382a3 100644
--- a/apps/web/src/app/mentor/chat/_ui/ChatPageClient/index.tsx
+++ b/apps/web/src/app/mentor/chat/_ui/ChatPageClient/index.tsx
@@ -13,6 +13,7 @@ const ChatPageClient = () => {
const { data: myInfo } = useGetMyInfo();
const isMentee = myInfo?.role === UserRole.MENTEE;
+ const isPartnerMentor = isMentee;
// 연결된 멘토가 없을 때의 처리 (멘티만)
if (chatRooms.length === 0 && isMentee) {
@@ -90,7 +91,7 @@ const ChatPageClient = () => {
className="flex items-center justify-between border-b border-k-50 py-2"
>
-
+
{nickname}
{lastChatMessage}
diff --git a/apps/web/src/app/my/_ui/MyProfileContent/index.tsx b/apps/web/src/app/my/_ui/MyProfileContent/index.tsx
index fa76d541..35fe6c91 100644
--- a/apps/web/src/app/my/_ui/MyProfileContent/index.tsx
+++ b/apps/web/src/app/my/_ui/MyProfileContent/index.tsx
@@ -79,7 +79,7 @@ const MyProfileContent = () => {
{/* Profile Card */}
-
+
{nickname}
diff --git a/apps/web/src/components/ui/ProfileWithBadge.tsx b/apps/web/src/components/ui/ProfileWithBadge.tsx
index ae2043e4..4aa1d63d 100644
--- a/apps/web/src/components/ui/ProfileWithBadge.tsx
+++ b/apps/web/src/components/ui/ProfileWithBadge.tsx
@@ -4,6 +4,7 @@ import { IconGraduation } from "@/public/svgs/mentor";
interface ProfileWithBadgeProps {
profileImageUrl?: string | null;
+ isMentor?: boolean;
hasBadge?: boolean;
width?: number;
height?: number;
@@ -12,11 +13,14 @@ interface ProfileWithBadgeProps {
const ProfileWithBadge = ({
profileImageUrl,
+ isMentor,
hasBadge = false,
width = 86,
height = 86,
isBadgeUp = true,
}: ProfileWithBadgeProps) => {
+ const showMentorBadge = isMentor ?? hasBadge;
+
// 배지 크기를 전체 크기에 비례해서 계산
const badgeSize = Math.round(width * 0.35);
const iconSize = Math.round(badgeSize * 0.67);
@@ -26,7 +30,7 @@ const ProfileWithBadge = ({
{/* 프로필 이미지 */}
{/* 학습 상태 배지 */}
- {hasBadge && (
+ {showMentorBadge && (