diff --git a/frontend/files/records/app.js b/frontend/files/records/app.js index 272390a..ec9ba60 100644 --- a/frontend/files/records/app.js +++ b/frontend/files/records/app.js @@ -39,6 +39,9 @@ function renderTable(records, sortField) { var recordElement = document.getElementById("records"); recordElement.innerHTML = TableTemplate(records); + var recordCount = document.getElementById("recordCount"); + recordCount.innerHTML = `${records.length} records`; + // add listeners for selecting record to view Array.from(recordElement.querySelectorAll("tbody tr")) .slice(1) // remove header from Array @@ -144,10 +147,17 @@ function RecordTemplate({ `; } -function TableRowTemplate({ name, coverURL }) { +function TableRowTemplate({ name, coverURL, discogsURL }) { return `