diff --git a/src/components/Menu/MenuOptions/ClearConversation.tsx b/src/components/Menu/MenuOptions/ClearConversation.tsx index 9c054e1..f5fdcc0 100644 --- a/src/components/Menu/MenuOptions/ClearConversation.tsx +++ b/src/components/Menu/MenuOptions/ClearConversation.tsx @@ -1,13 +1,38 @@ -import React from 'react'; +import React, { useState } from 'react'; +import PopupModal from '@components/PopupModal'; import DeleteIcon from '@icon/DeleteIcon'; +import useInitialiseNewChat from '@hooks/useInitialiseNewChat'; const ClearConversation = () => { + const initialiseNewChat = useInitialiseNewChat(); + const [isModalOpen, setIsModalOpen] = useState(false); + + const handleConfirm = () => { + setIsModalOpen(false); + initialiseNewChat(); + }; + return ( - - - Clear conversations - + <> + { + setIsModalOpen(true); + }} + > + + Clear conversations + + {isModalOpen && ( + + )} + ); }; diff --git a/src/components/Menu/MenuOptions/MenuOptions.tsx b/src/components/Menu/MenuOptions/MenuOptions.tsx index 72d83e4..8e41ca8 100644 --- a/src/components/Menu/MenuOptions/MenuOptions.tsx +++ b/src/components/Menu/MenuOptions/MenuOptions.tsx @@ -11,7 +11,7 @@ import Updates from './Updates'; const MenuOptions = () => { return ( <> - {/* */} + {/* */}