Skip to content

Commit 8fd5072

Browse files
committed
adjust emoji types on Channel
1 parent 4abbe23 commit 8fd5072

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/components/Channel/Channel.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ import PropTypes from 'prop-types';
1919
import { logChatPromiseExecution, Channel as StreamChannel } from 'stream-chat';
2020
import { v4 as uuidv4 } from 'uuid';
2121

22-
// TODO: change to import type in TS refactor
23-
import {
24-
Data as EmojiMartData, // eslint-disable-line
25-
NimbleEmojiIndex, // eslint-disable-line
26-
NimbleEmojiProps, // eslint-disable-line
27-
NimblePickerProps, // eslint-disable-line
28-
} from 'emoji-mart';
29-
3022
import { Attachment as DefaultAttachment } from '../Attachment';
3123
import { commonEmoji, defaultMinimalEmojis, emojiSetDef } from './emojiData';
3224
import { MessageSimple } from '../Message';
@@ -600,18 +592,22 @@ Channel.propTypes = {
600592
/**
601593
* Optional component to override default NimbleEmoji from emoji-mart
602594
*/
595+
// @ts-expect-error import type when converted to TS
603596
Emoji: /** @type {PropTypes.Validator<React.ElementType<NimbleEmojiProps>>} */ (PropTypes.elementType),
604597
/**
605598
* Optional prop to override default facebook.json emoji data set from emoji-mart
606599
*/
600+
// @ts-expect-error import type when converted to TS
607601
emojiData: /** @type {PropTypes.Validator<EmojiMartData>} */ (PropTypes.object),
608602
/**
609603
* Optional component to override default NimbleEmojiIndex from emoji-mart
610604
*/
605+
// @ts-expect-error import type when converted to TS
611606
EmojiIndex: /** @type {PropTypes.Validator<NimbleEmojiIndex>} */ (PropTypes.object),
612607
/**
613608
* Optional component to override default NimblePicker from emoji-mart
614609
*/
610+
// @ts-expect-error import type when converted to TS
615611
EmojiPicker: /** @type {PropTypes.Validator<React.ElementType<NimblePickerProps>>} */ (PropTypes.elementType),
616612
};
617613

0 commit comments

Comments
 (0)