Skip to content

Commit

Permalink
Use own interface for Emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Apr 25, 2024
1 parent a97655e commit 4898c54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/components/message/Emoji.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface Emoji {
native: string
}
11 changes: 3 additions & 8 deletions src/components/message/EmojiPickerModal.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,13 +17,8 @@ const EmojiPickerModal: FC<Props> = ({ open, onClose, onChange }) => {
}

return (
<Modal
dialogContentSx={{ px: 0 }}
onClose={onClose}
open={open}
title="Insert emoji"
>
<Picker data={data} onClickOutside={() => onClose } onEmojiSelect={handleChange}/>
<Modal dialogContentSx={{ px: 0 }} onClose={onClose} open={open} title="Insert emoji">
<Picker data={data} onClickOutside={() => onClose} onEmojiSelect={handleChange} />
</Modal>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/message/MessageForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4898c54

Please sign in to comment.