Simplify loading emoji data (#1790)
This commit is contained in:
parent
9fb20517ae
commit
f9944b55e2
4 changed files with 3 additions and 22 deletions
|
@ -72,8 +72,9 @@ export function EmojiPicker({close}: {close: () => void}) {
|
|||
},
|
||||
]}>
|
||||
<Picker
|
||||
// @ts-ignore we set emojiMartData in `emoji-mart-data.js` file
|
||||
data={window.emojiMartData}
|
||||
data={async () => {
|
||||
return (await import('./EmojiPickerData.json')).default
|
||||
}}
|
||||
onEmojiSelect={onInsert}
|
||||
autoFocus={false}
|
||||
/>
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue