Adds message forwarding
This commit is contained in:
parent
cd489a35fd
commit
d203f125c6
42 changed files with 1638 additions and 139 deletions
|
@ -5,7 +5,7 @@ import * as React from 'react';
|
|||
import { useSelector } from 'react-redux';
|
||||
import { get } from 'lodash';
|
||||
import { StateType } from '../reducer';
|
||||
import { useActions as useItemActions, useRecentEmojis } from '../ducks/items';
|
||||
import { useRecentEmojis } from '../selectors/emojis';
|
||||
import { useActions as useEmojiActions } from '../ducks/emojis';
|
||||
|
||||
import {
|
||||
|
@ -17,8 +17,8 @@ import { LocalizerType } from '../../types/Util';
|
|||
|
||||
export const SmartEmojiPicker = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
Pick<EmojiPickerProps, 'onPickEmoji' | 'onClose' | 'style'>
|
||||
>(({ onPickEmoji, onClose, style }, ref) => {
|
||||
Pick<EmojiPickerProps, 'onPickEmoji' | 'onSetSkinTone' | 'onClose' | 'style'>
|
||||
>(({ onPickEmoji, onSetSkinTone, onClose, style }, ref) => {
|
||||
const i18n = useSelector<StateType, LocalizerType>(getIntl);
|
||||
const skinTone = useSelector<StateType, number>(state =>
|
||||
get(state, ['items', 'skinTone'], 0)
|
||||
|
@ -26,15 +26,6 @@ export const SmartEmojiPicker = React.forwardRef<
|
|||
|
||||
const recentEmojis = useRecentEmojis();
|
||||
|
||||
const { putItem } = useItemActions();
|
||||
|
||||
const onSetSkinTone = React.useCallback(
|
||||
tone => {
|
||||
putItem('skinTone', tone);
|
||||
},
|
||||
[putItem]
|
||||
);
|
||||
|
||||
const { onUseEmoji } = useEmojiActions();
|
||||
|
||||
const handlePickEmoji = React.useCallback(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue