From 9c2f22e0f8b182cb8efd32915bf2df4280c8f634 Mon Sep 17 00:00:00 2001 From: Suraj Date: Tue, 27 Jan 2026 18:03:25 +0530 Subject: [PATCH] fix: resolve missing unique key prop warnings in ChatInputFormattingToolbar --- .../ChatInput/ChatInputFormattingToolbar.js | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js b/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js index 5d8c20a600..1df92d39f8 100644 --- a/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js +++ b/packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js @@ -1,4 +1,4 @@ -import React, { useState, useRef, useEffect } from 'react'; +import React, { useState, useRef } from 'react'; import { css } from '@emotion/react'; import { Box, @@ -87,7 +87,7 @@ const ChatInputFormattingToolbar = ({ emoji: isPopoverOpen && popOverItems.includes('emoji') ? ( { @@ -116,6 +116,7 @@ const ChatInputFormattingToolbar = ({ audio: ( { @@ -147,7 +149,7 @@ const ChatInputFormattingToolbar = ({ file ) : ( - + { @@ -176,7 +178,7 @@ const ChatInputFormattingToolbar = ({ link ) : ( - + formatter.find((item) => item.name === name)) .map((item) => isPopoverOpen && popOverItems.includes('formatter') ? ( - <> - { + if (isRecordingMessage) return; + handleFormatterClick(item); + }} + css={styles.popOverItemStyles} + > + { - if (isRecordingMessage) return; - handleFormatterClick(item); - }} - css={styles.popOverItemStyles} - > - - {item.name} - - + name={item.name} + size="1rem" + /> + {item.name} + ) : ( handleFormatterClick(itemInFormatter)} css={styles.popOverItemStyles} @@ -296,7 +296,7 @@ const ChatInputFormattingToolbar = ({ setInsertLinkOpen(false)} @@ -360,4 +361,4 @@ const ChatInputFormattingToolbar = ({ ); }; -export default ChatInputFormattingToolbar; +export default ChatInputFormattingToolbar; \ No newline at end of file