From 469dc7c737ee33e2e39adb1033b76319eb4a8920 Mon Sep 17 00:00:00 2001 From: Thomas Draier Date: Tue, 26 Nov 2024 16:46:47 +0100 Subject: [PATCH] show selected conversation --- .../components/conversation/ConversationsListButton.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extension/app/src/components/conversation/ConversationsListButton.tsx b/extension/app/src/components/conversation/ConversationsListButton.tsx index 74abea6dc65c..0e42a8ae4aae 100644 --- a/extension/app/src/components/conversation/ConversationsListButton.tsx +++ b/extension/app/src/components/conversation/ConversationsListButton.tsx @@ -12,7 +12,7 @@ import { } from "@dust-tt/sparkle"; import { useConversations } from "@extension/components/conversation/useConversations"; import moment from "moment"; -import { useNavigate } from "react-router-dom"; +import { useNavigate, useParams } from "react-router-dom"; type GroupLabel = | "Today" @@ -24,6 +24,8 @@ type GroupLabel = const Content = () => { const { conversations, isConversationsLoading } = useConversations(); + const { conversationId } = useParams(); + const navigate = useNavigate(); const groupConversationsByDate = ( @@ -89,6 +91,11 @@ const Content = () => { { navigate(`/conversations/${conversation.sId}`); }}