How to use the emoji-mart/data/twitter.json.emojis function in emoji-mart

To help you get started, weโ€™ve selected a few emoji-mart examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github redwood / redwood / demos / desktop-chat-app / frontend / src / components / EmojiQuickSearch / index.jsx View on Github external
const filterEmojis = () => {
    let count = 0
    const fEmojis = Object.keys(emojiData.emojis).filter((emoji) => {
      let emojiKeywords = emoji
      if (emojiData.emojis[emoji].j) {
        emojiKeywords = `${emoji}|${emojiData.emojis[emoji].j.join(',')}`
      }

      const isMatch = emojiKeywords.includes(messageText.replace(':', ''))

      if (isMatch) {
        count++
        if (count > 10) {
          return
        }
        return isMatch
      }
    })
    setEmojisFound(!!fEmojis.length)
github redwood / redwood / demos / desktop-chat-app / frontend / src / components / EmojiQuickSearch / index.jsx View on Github external
const fEmojis = Object.keys(emojiData.emojis).filter((emoji) => {
      let emojiKeywords = emoji
      if (emojiData.emojis[emoji].j) {
        emojiKeywords = `${emoji}|${emojiData.emojis[emoji].j.join(',')}`
      }

      const isMatch = emojiKeywords.includes(messageText.replace(':', ''))

      if (isMatch) {
        count++
        if (count > 10) {
          return
        }
        return isMatch
      }
    })
    setEmojisFound(!!fEmojis.length)