Use individual images in emoji picker rather than a spritesheet

This commit is contained in:
Ken Powers 2019-06-17 14:46:42 -04:00 committed by Scott Nonnenberg
parent cc7b9da0cf
commit dcf6a5f59c
5 changed files with 80 additions and 36 deletions

View file

@ -28,12 +28,19 @@ function getImageTag({
const result = getReplacementData(match[0], match[1], match[2]);
if (is.string(result)) {
return <span key={key}>{match[0]}</span>;
return match[0];
}
const img = findImage(result.value, result.variation);
const title = getTitle(result.value);
if (
!img.path ||
!img.path.startsWith('node_modules/emoji-datasource-apple')
) {
return match[0];
}
return (
// tslint:disable-next-line react-a11y-img-has-alt
<img