From 8d7236b0db746304e25d1ed67eeaa0ebf38670cf Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Sat, 17 May 2025 00:07:54 +0530 Subject: [PATCH] (fix:action-buttons) redirect to conversations --- frontend/src/components/ActionButtons.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ActionButtons.tsx b/frontend/src/components/ActionButtons.tsx index d3c1c7f0..3bd71515 100644 --- a/frontend/src/components/ActionButtons.tsx +++ b/frontend/src/components/ActionButtons.tsx @@ -18,6 +18,8 @@ interface ActionButtonsProps { showShare?: boolean; } +import { useNavigate } from 'react-router-dom'; + export default function ActionButtons({ className = '', showNewChat = true, @@ -27,6 +29,7 @@ export default function ActionButtons({ const dispatch = useDispatch(); const conversationId = useSelector(selectConversationId); const [isShareModalOpen, setShareModalState] = useState(false); + const navigate = useNavigate(); const newChat = () => { dispatch(setConversation([])); @@ -35,8 +38,8 @@ export default function ActionButtons({ query: { conversationId: null }, }), ); + navigate('/'); }; - return (