diff --git a/app/(protected)/dashboard/_components/ChatList.tsx b/app/(protected)/dashboard/_components/ChatList.tsx index d324340..4e6fed8 100644 --- a/app/(protected)/dashboard/_components/ChatList.tsx +++ b/app/(protected)/dashboard/_components/ChatList.tsx @@ -14,8 +14,8 @@ export default function ChatList({ chats }: Props) { href={`/dashboard/chat/${sala.id}`} className="flex gap-5 items-center justify-between bg-purple w-full p-3 rounded-2xl min-w-0 flex-11/12" > -

- Chat con {sala.userIds[0]} +

+ {sala.displayNames[0]}

diff --git a/app/(protected)/dashboard/page.tsx b/app/(protected)/dashboard/page.tsx index bb35bcf..727399a 100644 --- a/app/(protected)/dashboard/page.tsx +++ b/app/(protected)/dashboard/page.tsx @@ -19,6 +19,8 @@ export default function Dashboard() { if (chatsLoading || isLoading) return ; + console.log('Chats:', chats); + return (

diff --git a/app/_lib/_interfaces/IChat.ts b/app/_lib/_interfaces/IChat.ts index dde041a..1382b26 100644 --- a/app/_lib/_interfaces/IChat.ts +++ b/app/_lib/_interfaces/IChat.ts @@ -7,4 +7,5 @@ export interface IChat { isDeleted: boolean; lastMessage?: IMessage; userIds: string[]; + displayNames: string[]; }