@@ -19,7 +19,7 @@ interface IProps {
1919export const ChatList = ( { userId, accessToken } : IProps ) => {
2020 const router = useRouter ( ) ;
2121 const handleClick = ( chatId : number ) => {
22- router . push ( `/chat/${ chatId } ` ) ;
22+ router . push ( `/message/ chat/${ chatId } ` ) ;
2323 } ;
2424 const { data : chatList } = useGetChatList ( { userId } ) ;
2525
@@ -62,19 +62,25 @@ export const ChatList = ({ userId, accessToken }: IProps) => {
6262 { /* 텍스트 영역 */ }
6363 < div className = 'flex flex-1 flex-col' >
6464 < span className = 'text-text-md-bold text-gray-800' > { chat . chatRoomName } </ span >
65- < span className = { cn ( 'text-text-sm-medium line-clamp-1 text-gray-700' ) } >
65+ < span
66+ className = { cn (
67+ 'text-text-sm-medium line-clamp-1 overflow-hidden break-all text-gray-700' ,
68+ ) }
69+ >
6670 { chat . lastMessage ? chat . lastMessage . content : '아직 대화가 없습니다.' }
6771 </ span >
6872 </ div >
6973
7074 { /* 안 읽은 메시지 수 */ }
7175 < span
7276 className = { cn (
73- 'text-mono-white text-text-xs-bold rounded-full bg-red -500 px-2 py-0.5 ' ,
77+ 'text-mono-white text-text-xs-bold bg-mint -500 flex items-center justify-center rounded-full ' ,
7478 chat . unreadCount === 0 && 'opacity-0' ,
79+ chat . unreadCount < 10 && 'size-6' ,
80+ chat . unreadCount >= 10 && 'h-6 w-7' ,
7581 ) }
7682 >
77- { chat . unreadCount > 99 ? '99+ ' : chat . unreadCount }
83+ { chat . unreadCount > 99 ? '99' : chat . unreadCount }
7884 </ span >
7985 </ li >
8086 ) )
0 commit comments