From 4898c54d41dff6d1fc6891ad2d54578567b28aee Mon Sep 17 00:00:00 2001 From: louis Date: Thu, 25 Apr 2024 19:23:43 +0200 Subject: [PATCH] Use own interface for Emoji --- src/components/message/Emoji.ts | 3 +++ src/components/message/EmojiPickerModal.tsx | 11 +++-------- src/components/message/MessageForm.tsx | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 src/components/message/Emoji.ts diff --git a/src/components/message/Emoji.ts b/src/components/message/Emoji.ts new file mode 100644 index 0000000..9020b21 --- /dev/null +++ b/src/components/message/Emoji.ts @@ -0,0 +1,3 @@ +export interface Emoji { + native: string +} diff --git a/src/components/message/EmojiPickerModal.tsx b/src/components/message/EmojiPickerModal.tsx index 6026451..9de43b1 100644 --- a/src/components/message/EmojiPickerModal.tsx +++ b/src/components/message/EmojiPickerModal.tsx @@ -1,8 +1,8 @@ import React, { FC } from 'react' import Modal from '../common/Modal' -import { Emoji } from 'emoji-mart' import data from '@emoji-mart/data' import Picker from '@emoji-mart/react' +import { Emoji } from './Emoji' interface Props { open: boolean @@ -17,13 +17,8 @@ const EmojiPickerModal: FC = ({ open, onClose, onChange }) => { } return ( - - onClose } onEmojiSelect={handleChange}/> + + onClose} onEmojiSelect={handleChange} /> ) } diff --git a/src/components/message/MessageForm.tsx b/src/components/message/MessageForm.tsx index 70016f3..1999693 100644 --- a/src/components/message/MessageForm.tsx +++ b/src/components/message/MessageForm.tsx @@ -15,7 +15,7 @@ import { Box, Button, FormGroup, IconButton, Stack, TextField } from '@mui/mater import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faMapLocationDot, faPaperPlane, faSmile } from '@fortawesome/free-solid-svg-icons' import palette from '../../theme/palette' -import { Emoji } from 'emoji-mart' +import { Emoji } from './Emoji' interface Props { ticker: Ticker