cleanup semicolon from js

This commit is contained in:
2026-01-31 15:43:58 +01:00
parent f919079f69
commit 640e7a3a4f
22 changed files with 1258 additions and 1269 deletions

View File

@@ -1,16 +1,16 @@
import { t, i18n } from '../../i18n.js';
import { mockListings } from '../../data/mock-listings.js';
import '../listing-card.js';
import '../search-box.js';
import { t, i18n } from '../../i18n.js'
import { mockListings } from '../../data/mock-listings.js'
import '../listing-card.js'
import '../search-box.js'
class PageHome extends HTMLElement {
connectedCallback() {
this.render();
this.unsubscribe = i18n.subscribe(() => this.render());
this.render()
this.unsubscribe = i18n.subscribe(() => this.render())
}
disconnectedCallback() {
if (this.unsubscribe) this.unsubscribe();
if (this.unsubscribe) this.unsubscribe()
}
render() {
@@ -25,7 +25,7 @@ class PageHome extends HTMLElement {
${this.renderListings()}
</div>
</section>
`;
`
}
renderListings() {
@@ -36,13 +36,13 @@ class PageHome extends HTMLElement {
price="${listing.price}"
location="${listing.location}"
></listing-card>
`).join('');
`).join('')
}
}
customElements.define('page-home', PageHome);
customElements.define('page-home', PageHome)
const style = document.createElement('style');
const style = document.createElement('style')
style.textContent = /* css */`
/* Search Section */
page-home .search-section {
@@ -57,5 +57,5 @@ style.textContent = /* css */`
page-home section h2 {
margin-bottom: var(--space-lg);
}
`;
document.head.appendChild(style);
`
document.head.appendChild(style)