Bugfix: Add lazy loading to emoji board (#259)
authorJustin Shaw <realjustinshaw@gmail.com>
Wed, 26 Jan 2022 06:48:11 +0000 (22:48 -0800)
committerGitHub <noreply@github.com>
Wed, 26 Jan 2022 06:48:11 +0000 (12:18 +0530)
* add lazy loading to emoji board

* add newline to end of package-lock file

src/app/organisms/emoji-board/EmojiBoard.jsx

index 7a13b6905ec91e4b64ba9c3a7cc5a477f6994ee9..f23643635112c9a6db4f835225893c4a9642dea9 100644 (file)
@@ -53,6 +53,7 @@ const EmojiGroup = React.memo(({ name, groupEmojis }) => {
                       unicode: emoji.unicode,
                       shortcodes: emoji.shortcodes?.toString(),
                       hexcode: emoji.hexcode,
+                      loading: 'lazy',
                     }),
                   },
                 ))
@@ -61,6 +62,7 @@ const EmojiGroup = React.memo(({ name, groupEmojis }) => {
                   <img
                     className="emoji"
                     draggable="false"
+                    loading="lazy"
                     alt={emoji.shortcode}
                     unicode={`:${emoji.shortcode}:`}
                     shortcodes={emoji.shortcode}