fixed menu rendering

This commit is contained in:
Fran Jurmanović
2021-06-01 23:41:54 +02:00
parent eca3d7db4a
commit 11bdec457c
7 changed files with 164 additions and 72 deletions

View File

@@ -30,7 +30,7 @@ class HistoryPageElement extends HTMLElement {
try {
const response = await this.transactionsService.getAll();
if (response) {
this.setTransactions(response);
this.setTransactions(response?.items);
}
} catch (err) {
throw err;
@@ -39,6 +39,7 @@ class HistoryPageElement extends HTMLElement {
setTransactions(transactions: Array<any>) {
this.transactions = transactions;
console.log(transactions);
this.update();
}
@@ -56,7 +57,7 @@ class HistoryPageElement extends HTMLElement {
<ul>
${this.transactions
? this.transactions.map((transaction) => {
html` <li>${transaction.description}</li> `;
return html` <li>${transaction.description}</li> `;
})
: null}
</ul>