๊ด€๋ฆฌ ๋ฉ”๋‰ด

Daehyunii's Dev-blog

ํŽ˜์ด์ง€์—์„œ ํด๋ฆญ์‹œ ๋ฐ์ดํ„ฐ ๋ณต์‚ฌํ•˜๊ธฐ ๋ณธ๋ฌธ

๐Ÿ“š Language & CS knowledge/React

ํŽ˜์ด์ง€์—์„œ ํด๋ฆญ์‹œ ๋ฐ์ดํ„ฐ ๋ณต์‚ฌํ•˜๊ธฐ

Daehyunii 2022. 12. 22. 13:57
const EmojiListItem = ({ emoji }) => {
  return (
    <ListItem onClick={() => navigator.clipboard.writeText(emoji.symbol)}>
      {/* navigator.clipboard.writeText(emoji.symbol)}> ์ด๊ฒŒ ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ณต์‚ฌํ•˜๋Š” ๋ฐฉ๋ฒ•์ž„! */}
      <Symbol>{emoji.symbol}</Symbol>
      <Title>{emoji.title}</Title>
      <Keywords>{emoji.keywords}</Keywords>
    </ListItem>
  );
};

click์ด๋ฒคํŠธ ๋ฐœ์ƒ์‹œ, clipboard์— ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅ