Created
September 3, 2021 05:37
-
-
Save hieptl/bc71c7f81aa3b1181e92d6a1771a703d to your computer and use it in GitHub Desktop.
CometChatContext.js - React Mention Chat App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
setToastMessage = (type, message) => { | |
switch(type) { | |
case "error": | |
this.toastRef.setError(message); | |
break; | |
case "success": | |
this.toastRef.setSuccess(message); | |
break; | |
case "info": | |
this.toastRef.setInfo(message); | |
break; | |
case "warning": | |
this.toastRef.setWarning(message); | |
break; | |
default: | |
break; | |
} | |
return null; | |
}; | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment