From cf9e610d836518db73b54aded42d5cf4ab812057 Mon Sep 17 00:00:00 2001 From: Monalisha Mishra <42746736+mishramonalisha76@users.noreply.github.com> Date: Wed, 20 Sep 2023 19:14:57 +0530 Subject: [PATCH 1/2] Wallet disconnect (#723) * fix: added disconnect for wallet * fix: added autoConnect * fix: changed onClick to onGetTokenClick * fix: fixed errors --- .../src/app/ChatUITest/ChatViewComponent.tsx | 2 +- .../components/chat/ChatViewComponent/ChatViewComponent.tsx | 4 ++-- packages/uiweb/src/lib/components/chat/exportedTypes.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx b/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx index 2bfa43a81..51efcde71 100644 --- a/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx +++ b/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx @@ -14,7 +14,7 @@ const ChatViewComponentTest = () => {

Chat UI Test page

- console.log("BOIIII RETURNNNSSSSS")} chatId='b8e068e02fe12d7136bc2f24408835573f30c6fbf0b65ea26ab4c7055a2c85f1' limit={10} isConnected={true} autoConnect={true}/> + console.log("BOIIII RETURNNNSSSSS")} chatId='b8e068e02fe12d7136bc2f24408835573f30c6fbf0b65ea26ab4c7055a2c85f1' limit={10} isConnected={true} autoConnect={true}/>
); diff --git a/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx b/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx index d7d4e196c..6678fa5d7 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx @@ -35,7 +35,7 @@ export const ChatViewComponent: React.FC = ( gif = true, isConnected = true, autoConnect = false, - onClick, + onGetTokenClick, } = options || {}; const { env, signer, account, pgpPrivateKey } = useChatData(); @@ -87,7 +87,7 @@ export const ChatViewComponent: React.FC = ( {(messageInput && (!!signer || (!!account && !!pgpPrivateKey) || isConnected )) && (
void; + onGetTokenClick?: () => void; } export interface IChatProfile { From 165312644d23f6b90cfdbcaa12ab1ed5de40cbfb Mon Sep 17 00:00:00 2001 From: Monalisha Mishra <42746736+mishramonalisha76@users.noreply.github.com> Date: Thu, 21 Sep 2023 21:46:58 +0530 Subject: [PATCH 2/2] Changed messageInput params Case (#725) * fix: added disconnect for wallet * fix: added autoConnect * fix: changed onClick to onGetTokenClick * fix: fixed errors --- .../chat/ChatViewComponent/ChatViewComponent.tsx | 6 +++--- .../components/chat/MessageInput/MessageInput.tsx | 12 ++++++------ .../uiweb/src/lib/components/chat/exportedTypes.ts | 7 +++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx b/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx index 6678fa5d7..9cd16d4da 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewComponent/ChatViewComponent.tsx @@ -89,9 +89,9 @@ export const ChatViewComponent: React.FC = ( diff --git a/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx b/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx index d8feee194..2fb41b5e2 100644 --- a/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx +++ b/packages/uiweb/src/lib/components/chat/MessageInput/MessageInput.tsx @@ -51,9 +51,9 @@ interface IThemeProps { export const MessageInput: React.FC = ({ chatId, - Emoji = true, - GIF = true, - File = true, + emoji = true, + gif = true, + file = true, isConnected = true, autoConnect = false, onGetTokenClick, @@ -556,7 +556,7 @@ export const MessageInput: React.FC = ({ (chatFeed && !chatFeed?.groupInformation)) && ( <>
- {Emoji && ( + {emoji && (
= ({ />
- {GIF && ( + {gif && (
= ({
)}
- {!fileUploading && File && ( + {!fileUploading && file && ( <>
void;