cleanup semicolon from js
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user