Skip to content

Commit

Permalink
Warning 4 Resolved (#363)
Browse files Browse the repository at this point in the history
* key-prop-warning-fix

* key-prop-warning-fix2
  • Loading branch information
umangutkarsh authored Jan 18, 2024
1 parent 1111d20 commit d4eaca2
Showing 1 changed file with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import AudioMessageRecorder from './AudioMessageRecorder';
import { Box } from '../Box';
import { Icon } from '../Icon';
import { ActionButton } from '../ActionButton';
import {Tooltip} from "../Tooltip"
import { Tooltip } from "../Tooltip"
import useComponentOverrides from '../../theme/useComponentOverrides';

const ChatInputFormattingToolbar = ({ messageRef, inputRef }) => {
Expand Down Expand Up @@ -71,17 +71,17 @@ const ChatInputFormattingToolbar = ({ messageRef, inputRef }) => {
>
{isUserAuthenticated && (
<>
<Tooltip text="Emoji" position="top">
<div>
<ActionButton
square
ghost
disabled={isRecordingMessage}
onClick={() => setEmojiOpen((t) => !t)}
>
<Icon name="emoji" size="1.25rem" />
</ActionButton>
</div>
<Tooltip text="Emoji" position="top">
<div>
<ActionButton
square
ghost
disabled={isRecordingMessage}
onClick={() => setEmojiOpen((t) => !t)}
>
<Icon name="emoji" size="1.25rem" />
</ActionButton>
</div>
</Tooltip>
<Popup
modal
Expand All @@ -102,22 +102,21 @@ const ChatInputFormattingToolbar = ({ messageRef, inputRef }) => {
</>
)}
{formatter.map((item, index) => (

<Tooltip text={item.name} position="top">
<ActionButton
square
disabled={isRecordingMessage}
ghost
onClick={() => {
wrapSelection(item.pattern);
}}
key={index}
>
<Icon disabled={isRecordingMessage} name={item.name} size="1.25rem" />

</ActionButton>

<Tooltip text={item.name} position="top" key={index}>
<ActionButton
square
disabled={isRecordingMessage}
ghost
onClick={() => {
wrapSelection(item.pattern);
}}
>
<Icon disabled={isRecordingMessage} name={item.name} size="1.25rem" />

</ActionButton>
</Tooltip>

))}
<Tooltip text="Audio Message" position="top"><AudioMessageRecorder /></Tooltip>
<ActionButton
Expand Down

0 comments on commit d4eaca2

Please sign in to comment.