From c99bca071ab47354377a75edfbe14d47ce1e556f Mon Sep 17 00:00:00 2001 From: Akshun-01 Date: Tue, 12 Mar 2024 20:19:15 +0530 Subject: [PATCH] linting check --- packages/react/src/components/ChatInput/ChatInput.js | 6 +++--- packages/react/src/components/CommandList/CommandsList.js | 8 +++++--- packages/react/src/components/Mentions/MembersList.js | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/react/src/components/ChatInput/ChatInput.js b/packages/react/src/components/ChatInput/ChatInput.js index e3f845440..2675ee169 100644 --- a/packages/react/src/components/ChatInput/ChatInput.js +++ b/packages/react/src/components/ChatInput/ChatInput.js @@ -463,7 +463,7 @@ const ChatInput = ({ scrollToBottom }) => { mentionIndex - 1 < 0 ? filteredMembers.length + 1 : mentionIndex - 1 ); setCommandIndex( - commandIndex - 1 < 0 ? filteredCommands.length - 1 : commandIndex - 1 + commandIndex - 1 < 0 ? filteredCommands.length - 1 : commandIndex - 1 ); const lastIndexOfAt = messageRef.current.value.lastIndexOf('@'); @@ -486,12 +486,12 @@ const ChatInput = ({ scrollToBottom }) => { setStartReading(false); setFilteredMembers([]); setmentionIndex(-1); - } else if(filteredCommands.length > 0){ + } else if (filteredCommands.length > 0) { const selectedCommand = filteredCommands[commandIndex]; onCommandClick(selectedCommand); setCommandIndex(0); - }else { + } else { sendTypingStop(); sendMessage(); } diff --git a/packages/react/src/components/CommandList/CommandsList.js b/packages/react/src/components/CommandList/CommandsList.js index aafdfb002..157530d12 100644 --- a/packages/react/src/components/CommandList/CommandsList.js +++ b/packages/react/src/components/CommandList/CommandsList.js @@ -86,12 +86,14 @@ function CommandsList({ if (commandRef.current) { const selectedCommand = commandRef.current.children[commandIndex]; if (selectedCommand) { - selectedCommand.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); + selectedCommand.scrollIntoView({ + behavior: 'smooth', + block: 'nearest', + }); } } }, [commandIndex]); - return ( (
  • handleCommandClick(command)} onKeyDown={(e) => { diff --git a/packages/react/src/components/Mentions/MembersList.js b/packages/react/src/components/Mentions/MembersList.js index 4d8e3d84d..7d6d732f5 100644 --- a/packages/react/src/components/Mentions/MembersList.js +++ b/packages/react/src/components/Mentions/MembersList.js @@ -45,7 +45,7 @@ function MembersList({ mentionIndex, filteredMembers = [], onMemberClick }) { font-weight: 600; `; - const memberRef = useRef(null); + const memberRef = useRef(null); const handleMemberClick = useCallback( (selectedItem) => {