Ensure that one emoji is added, when expected
This commit is contained in:
parent
b290b577d4
commit
c6819a5438
2 changed files with 3 additions and 7 deletions
|
@ -146,12 +146,9 @@ export const StoryViewsNRepliesModal = ({
|
|||
|
||||
const insertEmoji = useCallback(
|
||||
(e: EmojiPickDataType) => {
|
||||
if (inputApiRef.current) {
|
||||
inputApiRef.current.insertEmoji(e);
|
||||
onUseEmoji(e);
|
||||
}
|
||||
onUseEmoji(e);
|
||||
},
|
||||
[inputApiRef, onUseEmoji]
|
||||
[onUseEmoji]
|
||||
);
|
||||
|
||||
const [referenceElement, setReferenceElement] =
|
||||
|
|
|
@ -152,8 +152,7 @@ export const EmojiPicker = React.memo(
|
|||
doSend();
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
if (shortName) {
|
||||
} else if (shortName) {
|
||||
onPickEmoji({ skinTone: selectedTone, shortName });
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue