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

interface Props {
  children: string[];
}

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

export default Emoji;
