diff --git a/next.config.ts b/next.config.ts index 2d85301d..45e91916 100644 --- a/next.config.ts +++ b/next.config.ts @@ -27,6 +27,10 @@ const nextConfig: NextConfig = { port: '', pathname: '/**', }, + { + protocol: 'https', + hostname: 'lh3.googleusercontent.com', + }, ], //imagesSizes, deviceSizes는 기본 설정 imageSizes: [96, 128, 256, 384], diff --git a/src/components/pages/chat/chat-list/index.tsx b/src/components/pages/chat/chat-list/index.tsx index b30b24bc..fbee6ff4 100644 --- a/src/components/pages/chat/chat-list/index.tsx +++ b/src/components/pages/chat/chat-list/index.tsx @@ -1,11 +1,11 @@ 'use client'; -import Image from 'next/image'; import { useRouter } from 'next/navigation'; import { useMemo } from 'react'; import { DEFAULT_PROFILE_IMAGE } from 'constants/default-images'; +import { ImageWithFallback } from '@/components/ui'; import { useChatListSocket, useGetChatList } from '@/hooks/use-chat'; import { cn } from '@/lib/utils'; @@ -52,7 +52,7 @@ export const ChatList = ({ userId, accessToken }: IProps) => { > {/* 프로필 이미지 - 이미지 수정 필요💥💥*/}
- 프로필 이미지 { const { senderProfileImage, senderName, content, timestamp, createdAt } = item; const time = timestamp ?? createdAt; - return (
- 프로필 이미지
diff --git a/src/components/pages/chat/chat-user-list/index.tsx b/src/components/pages/chat/chat-user-list/index.tsx index f8e79059..6cab7ee5 100644 --- a/src/components/pages/chat/chat-user-list/index.tsx +++ b/src/components/pages/chat/chat-user-list/index.tsx @@ -27,6 +27,12 @@ export const UserList = ({ onClose, roomId, roomType, userId }: UserListProps) = const isCurrentUserOwner = data?.participants.some( (participant) => participant.userId === userId && participant.isOwner, ); + const sortedParticipants = data?.participants + ? [...data.participants].sort((a, b) => { + if (a.isOwner === b.isOwner) return 0; + return a.isOwner ? -1 : 1; + }) + : []; return (
@@ -55,7 +61,7 @@ export const UserList = ({ onClose, roomId, roomType, userId }: UserListProps) = {/* 유저 리스트 */}
- {data?.participants.map((user, index) => ( + {sortedParticipants.map((user, index) => (