refactor Offer to OfferCard

This commit is contained in:
counterweight 2025-04-16 16:41:39 +02:00
parent 042bb43d9c
commit 371204785d
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -50,7 +50,7 @@ function offersPage() {
viewMyOffersRoot.style.display =
viewMyOffersRoot.style.display === 'block' ? 'none' : 'block';
}
class Offer {
class OfferCard {
constructor(offerData) {
this.uuid = offerData.uuid;
this.public_key = offerData.public_key;
@ -440,7 +440,7 @@ function offersPage() {
const offersData = (await offersResponse.json()).data;
if (offersResponse.ok) {
for (const record of offersData) {
this.offers.push(new Offer(record));
this.offers.push(new OfferCard(record));
}
}
}