From 085bd3400c9cfcf181e8dd11b250cd38d60b1166 Mon Sep 17 00:00:00 2001 From: DanilsGit Date: Tue, 24 Jun 2025 01:21:24 -0500 Subject: [PATCH] add names in dashboard chats --- app/(protected)/dashboard/_components/ChatList.tsx | 4 ++-- app/(protected)/dashboard/page.tsx | 2 ++ app/_lib/_interfaces/IChat.ts | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) 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[]; }