import { timeTag, truncate } from 'src/lib/formatters'

const KaufsList = ({ kaufs }) => {

  return (
    <div className="rw-segment rw-table-wrapper-responsive">
      <table className="rw-table">
        <thead>
          <tr>
            <th>Id</th>
            <th>Uhrzeit</th>
          </tr>
        </thead>
        <tbody>
          {kaufs.map((kauf) => (
            <tr key={kauf.id}>
              <td>{truncate(kauf.id+100)}</td>
              <td>{truncate(kauf.timestamp)}</td>
            </tr>
          ))}
        </tbody>
      </table>
    </div>
  )
}

export default KaufsList
