aboutsummaryrefslogtreecommitdiff
path: root/src/Emoji.tsx
blob: b9280879e6ce68525d61131f9fe3612b3329ec4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { FC } from 'react';
import Image from 'next/future/image';

interface Props {
  children: string[];
}

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

export default Emoji;