render()

in src/components/Chat/Chat.js [127:167]


  render() {
    const {chatSession, headerConfig, transcriptConfig, composerConfig, footerConfig} = this.props;
    console.log('MESSAGES', this.state.transcript);

    return (
      <ChatWrapper>
        {(this.state.contactStatus === CONTACT_STATUS.CONNECTED ||
          this.state.contactStatus === CONTACT_STATUS.CONNECTING || this.state.contactStatus === CONTACT_STATUS.ENDED) && 
        <Header headerConfig={headerConfig}/>
        }

        <ChatTranscriptor
          loadPreviousTranscript={() => chatSession.loadPreviousTranscript()}
          addMessage={(data) => chatSession.addOutgoingMessage(data)}
          downloadAttachment={(attachmentId) => chatSession.downloadAttachment(attachmentId)}
          transcript={this.state.transcript}
          typingParticipants={this.state.typingParticipants}
          contactStatus={this.state.contactStatus}
          contactId={chatSession.contactId}
          transcriptConfig={transcriptConfig}
          textInputRef={textInputRef}
        />
        <ChatComposer
          contactStatus={this.state.contactStatus}
          contactId={chatSession.contactId}
          addMessage={(contactId, data) => chatSession.addOutgoingMessage(data)}
          addAttachment={(contactId, attachment) => chatSession.addOutgoingAttachment(attachment)}
          onTyping={() => chatSession.sendTypingEvent()}
          composerConfig={composerConfig}
          textInputRef={textInputRef}
        />
        {<ChatActionBar
          onEndChat={() => this.endChat()}
          onClose ={() => this.closeChat()}
          contactStatus={this.state.contactStatus}
          footerConfig={footerConfig}
        />
        }
      </ChatWrapper>
    );
  }