From 9aa67e9b1037e6d0bde3b181ab8ac653e4374048 Mon Sep 17 00:00:00 2001 From: HopeFullee Date: Mon, 12 Jan 2026 01:14:30 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20profileImage=20=EA=B3=B5=ED=86=B5?= =?UTF-8?q?=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pages/chat/chat-list/index.tsx | 14 +---- .../pages/chat/chat-other-chat/index.tsx | 10 +--- .../pages/chat/chat-user-list/index.tsx | 13 +--- .../description-profile/index.tsx | 11 +--- .../pages/group/group-members/index.tsx | 12 +--- .../pages/group/group-modal/index.tsx | 7 ++- .../message/message-following-card/index.tsx | 13 +--- .../pending-member-card/index.tsx | 12 +--- .../pages/user/profile/profile-card/index.tsx | 15 +---- .../profile-edit-fields/image-field/index.tsx | 10 ++-- .../profile/profile-follows-modal/index.tsx | 17 +----- .../shared/card/card-profile/index.tsx | 15 ++--- .../shared/card/card-thumbnail/index.tsx | 2 +- src/components/shared/card/index.tsx | 2 +- src/components/shared/index.ts | 1 + src/components/shared/profile-image/index.tsx | 60 +++++++++++++++++++ .../ui/image-with-fallback/index.tsx | 16 ++--- 17 files changed, 105 insertions(+), 125 deletions(-) create mode 100644 src/components/shared/profile-image/index.tsx diff --git a/src/components/pages/chat/chat-list/index.tsx b/src/components/pages/chat/chat-list/index.tsx index cb929d97..81ac268e 100644 --- a/src/components/pages/chat/chat-list/index.tsx +++ b/src/components/pages/chat/chat-list/index.tsx @@ -3,9 +3,7 @@ import { useRouter } from 'next/navigation'; import { useMemo } from 'react'; -import { DEFAULT_PROFILE_IMAGE } from 'constants/default-images'; - -import { ImageWithFallback } from '@/components/ui'; +import { ProfileImage } from '@/components/shared'; import { useChatListSocket, useGetChatList } from '@/hooks/use-chat'; import { cn } from '@/lib/utils'; @@ -49,15 +47,7 @@ export const ChatList = ({ userId, accessToken }: IProps) => { onClick={() => handleClick(chat.chatRoomId)} > {/* 프로필 이미지 - 이미지 수정 필요💥💥*/} -
- -
+ {/* 텍스트 영역 */}
diff --git a/src/components/pages/chat/chat-other-chat/index.tsx b/src/components/pages/chat/chat-other-chat/index.tsx index 39630e81..82cbf4ca 100644 --- a/src/components/pages/chat/chat-other-chat/index.tsx +++ b/src/components/pages/chat/chat-other-chat/index.tsx @@ -1,4 +1,4 @@ -import { ImageWithFallback } from '@/components/ui'; +import { ProfileImage } from '@/components/shared'; import { formatKoreanTime } from '@/lib/formatDateTime'; import { ChatMessage } from '@/types/service/chat'; @@ -13,13 +13,7 @@ export const OtherChat = ({ item }: IProps) => { const time = timestamp ?? createdAt; return (
- +
{senderName} diff --git a/src/components/pages/chat/chat-user-list/index.tsx b/src/components/pages/chat/chat-user-list/index.tsx index 6cab7ee5..3974f225 100644 --- a/src/components/pages/chat/chat-user-list/index.tsx +++ b/src/components/pages/chat/chat-user-list/index.tsx @@ -1,12 +1,9 @@ 'use client'; -import Image from 'next/image'; - import { useState } from 'react'; -import { DEFAULT_PROFILE_IMAGE } from 'constants/default-images'; - import { Icon } from '@/components/icon'; +import { ProfileImage } from '@/components/shared'; import { useModal } from '@/components/ui'; import { useGetParticipants } from '@/hooks/use-chat'; @@ -65,13 +62,7 @@ export const UserList = ({ onClose, roomId, roomType, userId }: UserListProps) =
- profile +
diff --git a/src/components/pages/group/group-descriptions/description-sections/description-profile/index.tsx b/src/components/pages/group/group-descriptions/description-sections/description-profile/index.tsx index 4cc36c80..8466ed7b 100644 --- a/src/components/pages/group/group-descriptions/description-sections/description-profile/index.tsx +++ b/src/components/pages/group/group-descriptions/description-sections/description-profile/index.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; -import { ImageWithFallback } from '@/components/ui'; +import { ProfileImage } from '@/components/shared'; import { PendingBadge } from '@/components/ui'; import { GetGroupDetailsResponse } from '@/types/service/group'; @@ -24,14 +24,7 @@ export const DescriptionProfile = ({ return (
- - +

{nickName}

{profileMessage &&

{profileMessage}

} diff --git a/src/components/pages/group/group-members/index.tsx b/src/components/pages/group/group-members/index.tsx index c4e7e695..683bc771 100644 --- a/src/components/pages/group/group-members/index.tsx +++ b/src/components/pages/group/group-members/index.tsx @@ -8,8 +8,8 @@ import clsx from 'clsx'; import { Icon } from '@/components/icon'; import { GroupModal } from '@/components/pages/group/group-modal'; -import { AnimateDynamicHeight } from '@/components/shared'; -import { Button, ImageWithFallback } from '@/components/ui'; +import { AnimateDynamicHeight, ProfileImage } from '@/components/shared'; +import { Button } from '@/components/ui'; import { useModal } from '@/components/ui'; import { GetGroupDetailsResponse, KickGroupMemberParams } from '@/types/service/group'; @@ -49,13 +49,7 @@ export const GroupMembers = ({ members, isHost }: Props) => {
- + {isHost && idx !== 0 && (