ChatActions.js 472 B

12345678910111213141516171819
  1. const ChatConstants = require('../constants/ChatConstants');
  2. let AppDispatcher = require('../dispatcher/AppDispatcher');
  3. let ChatActions = {
  4. toggleChat() {
  5. AppDispatcher.handleViewAction({
  6. actionType: ChatConstants.TOGGLE_CHAT
  7. });
  8. },
  9. submitMessage(message, className) {
  10. AppDispatcher.handleViewAction({
  11. actionType: ChatConstants.SUBMIT_MESSAGE,
  12. message: message,
  13. className: className
  14. });
  15. }
  16. };
  17. module.exports = ChatActions;