JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://api.trello.com/1/client.js?key=00f1dd1e00000f1dd1e00000f1dd1e00&amp;dummy=.js"></script>
<script src="https://raw.github.com/timrwood/moment/1.7.2/min/moment.min.js"></script>
<div id="loggedout">
    <a id="connectLink" href="#">Connect To Trello</a>
</div>

<div id="loggedin">
    <div id="header">
        Logged in to as <span id="fullName"></span> 
        <a id="disconnect" href="#">Log Out</a>
    </div>
    
    <div id="output"></div>
</div>

CSS

body {
    font-family: arial;
    font-size: 12px;
}

#loggedout {
    text-align: center;
    font-size: 20px;
    padding-top: 30px;
}
#loggedin { 
    display: none; 
}

#header {
    padding: 4px;
    border-bottom: 1px solid #000;
    background: #eee;
}

#output {
    padding: 4px;
}

.card { 
    display: block; 
    padding: 2px;
}

JavaScript

/* 
NOTE: The Trello client library has been included as a Managed Resource.  To include the client library in your own code, you would include jQuery and then

<script src="https://api.trello.com/1/client.js?key=your_application_key">...

See https://trello.com/docs for a list of available API URLs

The API development board is at https://trello.com/api

The &dummy=.js part of the managed resource URL is required per http://doc.jsfiddle.net/basic/introduction.html#add-resources
*/

var onAuthorize = function() {
    updateLoggedIn();
    $("#output").empty();

    Trello.members.get("me", function(member) {
        $("#fullName").text(member.fullName);

        var $cards = $("<div>").text("Loading Cards...").appendTo("#output");

        // Output a list of all of the cards that the member 
        // is assigned to
        Trello.get("/boards/50940a91ac2fec582d00827c/cards", function(cards) {
            $cards.empty();
            $.each(cards, function(ix, card) {
                Trello.get("/cards/" + card.id + "/actions?filter=updateCard", function(change_card) {                    
                    ago = moment(change_card[0].date.substr(0,10), "YYYY-MM-DD").fromNow().split(" ")[0];
                    
                    if(ago=="a") {ago=30};
                    
                    $("<div>").text(ago).appendTo("#output");
                    debugger                
                    Trello.post("cards/" + card.id + "/actions/comments", { 
                        token: Trello.token(),
                        key: Trello.key(),
                        text: "This card has been in this list for " + ago + " days."})
                    
                    //Trello.put("cards/" + card.id + "/name", "(" + ago + ") " + card.name);                     
                });
                //Trello.get("/cards/" + card.id + "/actions?filter=createCard", function(change_card) {
                //   ...