michaelchadwick/ember-remember-stuff

View on GitHub
packages/frontend/app/components/gh-commits/index.hbs

Summary

Maintainability
Test Coverage
<div class="gh-commits">
  <h3>{{if @title @title (t "components.ghCommits.head")}}</h3>
  {{#if @commits}}
    <table>
      <thead>
        <th></th>
        <th></th>
      </thead>
      <tbody>
        {{#each @commits as |commit|}}
          <tr>
            <td class="commit-date">
              {{format-date
                commit.commit.author.date
                month="2-digit"
                day="2-digit"
                year="numeric"
                hour="2-digit"
                minute="2-digit"
              }}
            </td>
            <td class="commit-message">
              <a href={{commit.html_url}} target="_blank" rel="noopener noreferrer">
                {{commit.commit.message}}
              </a>
            </td>
          </tr>
        {{/each}}
      </tbody>
    </table>
  {{else}}
    <p>{{t "general.noneFound" items="commits"}} {{t "errors.checkConsole"}}</p>
  {{/if}}
</div>