diff --git a/apps/browser/components/Sidebar.tsx b/apps/browser/components/Sidebar.tsx index abaecc68..78391cc4 100644 --- a/apps/browser/components/Sidebar.tsx +++ b/apps/browser/components/Sidebar.tsx @@ -20,6 +20,8 @@ import { NotePencil, PencilSimple, TrashSimple, + CheckCircle, + XCircle, } from "@phosphor-icons/react"; import { useRouter } from "next/navigation"; import { useSession } from "next-auth/react"; @@ -108,7 +110,7 @@ const Sidebar = ({ if (activeChat !== chatId) { setActiveChat(chatId); } - }, [chatId, activeChat]) + }, [chatId, activeChat]); useEffect(() => { function handleClickOutside(event: MouseEvent) { @@ -183,74 +185,86 @@ const Sidebar = ({ {!isLoadingChats ? (
{chats && chats.length > 0 ? ( -
- {mappedChats?.map((chat) => ( -
handleChatClick(chat.id)} - > - {chat.id === editChat?.id ? ( -
- { - if (e.key === "Enter") { - await handleEditClick( - chat.id, - e.currentTarget.value - ) - } - }} - /> -
- ) : ( - chat.name - )} +
+ {mappedChats?.map((chat) => { + chat.goalAchieved = Math.random() > 0.5; + return (
handleChatClick(chat.id)} > - - + + +
-
- ))} + ); + })}
) : (