cometchat / cometchat-uikit-react

Ready-to-use Chat UI Components for React (JavaScript/Web)
Other
92 stars 58 forks source link

Clone and import new repo got error module parse #60

Closed thinhbg2812-2 closed 3 years ago

thinhbg2812-2 commented 3 years ago

Describe the problem

Clone cometchat-pro-react-ui-kit repo and import CometChatUI got error image

What was the expected behavior?

Import and use as normal

Reproduction

Environment

thinhbg2812-2 commented 3 years ago

by comment all the place import audio, I manage to make it run image

priyadarshininadar commented 3 years ago

Hi @mrtk0y , you can toggle off sound for incoming/outgoing messages by using this method: UIKitSettings.setEnableSoundForMessages(false). Please refer to this link for more such customization: https://prodocs.cometchat.com/docs/react-ui-kit-customize

thinhbg2812-2 commented 3 years ago

Hi @mrtk0y , you can toggle off sound for incoming/outgoing messages by using this method: UIKitSettings.setEnableSoundForMessages(false). Please refer to this link for more such customization: https://prodocs.cometchat.com/docs/react-ui-kit-customize

Ah yes, I read the docs, but I don't know where to add "UIKitSettings.setEnableSoundForMessages" I'm not really familiar with class style I tried static setEnableSoundForMessages = false in UIKitSettings file but no use

priyadarshininadar commented 3 years ago

You can use the method before importing any of the UI Kit components. If you are trying to integrate the UI Kit with a Next.js project, please make sure you follow this documentation: Next js integration