owncast/web/components/chat/ChatTextField/EmojiPicker.tsx

36 lines
947 B
TypeScript
Raw Normal View History

2022-05-12 09:31:31 +03:00
// import data from '@emoji-mart/data';
import React, { useRef } from 'react';
2022-05-06 00:43:40 +03:00
2022-05-12 09:31:31 +03:00
interface Props {
// eslint-disable-next-line react/no-unused-prop-types
onEmojiSelect: (emoji: string) => void;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default function EmojiPicker(props: Props) {
2022-05-06 00:43:40 +03:00
const ref = useRef();
// TODO: Pull this custom emoji data in from the emoji API.
2022-05-12 09:31:31 +03:00
// const custom = [
// {
// emojis: [
// {
// id: 'party_parrot',
// name: 'Party Parrot',
// keywords: ['dance', 'dancing'],
// skins: [{ src: 'https://watch.owncast.online/img/emoji/bluntparrot.gif' }],
// },
// ],
// },
// ];
2022-05-06 00:43:40 +03:00
// TODO: Fix the emoji picker from throwing errors.
2022-05-06 00:43:40 +03:00
// useEffect(() => {
// import('emoji-mart').then(EmojiMart => {
// new EmojiMart.Picker({ ...props, data, ref });
// });
2022-05-06 00:43:40 +03:00
// }, []);
return <div ref={ref} />;
2022-05-06 00:43:40 +03:00
}