{
const queryString = $event.detail.tag;
let selectedButton = document.querySelector('button.active');
if(selectedButton !==null){
selectedButton.classList.remove('active');
}
$event.target.classList.add('active');
let queryURL = '/collections/frontpage/' + queryString;
if(queryString == 'all')
queryURL = '/collections/frontpage';
fetch(queryURL)
.then(response => response.text())
.then(data => {
//console.log(data)
let html_div = document.createElement('div');
html_div.innerHTML = data;
let html_dom = html_div.querySelector('#ProductGridContainer').innerHTML;
document.querySelector('#ProductGridContainer').innerHTML = html_dom;
history.replaceState(null, null, queryURL);
})
.catch(error => {
location = '/collections/frontpage';
console.error('Error:', error);
})
.finally(() => loading = false);
})
"
>
Loading...
{ activeItem = true })"
@mouseout="$nextTick(() => { activeItem = false })"
@variant-change.window="if($event.detail.productId == 8118197977391) price=$event.detail.price"
class="product-card w-full"
>
{ activeItem = true })"
@mouseout="$nextTick(() => { activeItem = false })"
@variant-change.window="if($event.detail.productId == 8118193062191) price=$event.detail.price"
class="product-card w-full"
>
{ activeItem = true })"
@mouseout="$nextTick(() => { activeItem = false })"
@variant-change.window="if($event.detail.productId == 8112220209455) price=$event.detail.price"
class="product-card w-full"
>