From d49f6d6cbda972e437516925e742efd31aa516f1 Mon Sep 17 00:00:00 2001 From: Zishan Ahmad Date: Sat, 17 Feb 2024 21:26:13 +0530 Subject: [PATCH] formatted with prettier --- packages/api/src/EmbeddedChatApi.ts | 21 ++++++++----------- .../src/components/ChatInput/ChatInput.js | 10 +++++++-- packages/react/src/store/userStore.js | 3 +-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/packages/api/src/EmbeddedChatApi.ts b/packages/api/src/EmbeddedChatApi.ts index e2deae1d3..6d3cc6987 100644 --- a/packages/api/src/EmbeddedChatApi.ts +++ b/packages/api/src/EmbeddedChatApi.ts @@ -445,18 +445,15 @@ export default class EmbeddedChatApi { async permissionInfo() { try { - const { userId, authToken } = await this.auth.getCurrentUser() || {}; - const response = await fetch( - `${this.host}/api/v1/permissions.listAll`, - { - headers: { - 'Content-Type': 'application/json', - 'X-Auth-Token': authToken, - 'X-User-Id': userId, - }, - method: 'GET', - } - ); + const { userId, authToken } = (await this.auth.getCurrentUser()) || {}; + const response = await fetch(`${this.host}/api/v1/permissions.listAll`, { + headers: { + "Content-Type": "application/json", + "X-Auth-Token": authToken, + "X-User-Id": userId, + }, + method: "GET", + }); return await response.json(); } catch (err) { console.error(err); diff --git a/packages/react/src/components/ChatInput/ChatInput.js b/packages/react/src/components/ChatInput/ChatInput.js index e0ae670b3..026b152f0 100644 --- a/packages/react/src/components/ChatInput/ChatInput.js +++ b/packages/react/src/components/ChatInput/ChatInput.js @@ -39,7 +39,7 @@ const ChatInput = ({ scrollToBottom }) => { const isUserAuthenticated = useUserStore( (state) => state.isUserAuthenticated ); - const canSendMsg = useUserStore((state)=>state.canSendMsg); + const canSendMsg = useUserStore((state) => state.canSendMsg); const setIsUserAuthenticated = useUserStore( (state) => state.setIsUserAuthenticated @@ -461,7 +461,13 @@ const ChatInput = ({ scrollToBottom }) => {