import { FC } from 'react';
import Image from 'next/future/image';
import config from './config';

interface Props {
  children: string[];
}

const Emoji: FC<Props> = ({ children }) => {
  const src = children[0];
  return (
    <Image
      src={`${config.CDN}${config.paths.emojiRoot}/${src}`}
      width={16}
      alt={`${src}-emoji`}
    />
  );
}

export default Emoji;
