async addMessageList()

in src/chat.js [120:143]


  async addMessageList(msg, content, variant) {
    let Messages = this.state.messageList;
    const index = Messages.length;
    this.setState({
      isLoading: true,
    })
    Messages.push(
      <ChatBubbleContainer
                timestamp={formatTime(msg.CreatedTimestamp)}
                css="margin: 1rem;"
                key={`message${index.toString()}`}
              >
                <ChatBubble
                    variant={variant}
                    senderName={msg.Sender.Name}
                    showName={true}
                    showTail={true}
                > {content} </ChatBubble>
            </ChatBubbleContainer>
    );
    this.setState({
      isLoading: false,
    })
  }