this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix dup keys

+7 -2
+7 -2
src/components/emoji-text.jsx
··· 17 17 // 'g', 18 18 // ); 19 19 const regex = shortcodesRegexp(emojis.map((e) => e.shortcode)); 20 - const elements = text.split(regex).map((word) => { 20 + const elements = text.split(regex).map((word, i) => { 21 21 const emoji = emojis.find((e) => e.shortcode === word); 22 22 if (emoji) { 23 23 const { url, staticUrl } = emoji; 24 24 return ( 25 - <CustomEmoji staticUrl={staticUrl} alt={word} url={url} key={word} /> 25 + <CustomEmoji 26 + staticUrl={staticUrl} 27 + alt={word} 28 + url={url} 29 + key={word + '-' + i} // Handle >= 2 same shortcodes 30 + /> 26 31 ); 27 32 } 28 33 return word;