Skip to content
{
loading = true;
if (!$store.cart.items?.length) location.reload();
fetch(location.href).then(res => res.text()).then(res => {
const dom = document.createElement('html');
dom.innerHTML = res;
$root.querySelector('#cart-items').innerHTML = dom.querySelector('#cart-items').innerHTML;
loading = false;
})
}
" @cart-add.window="$dispatch('cart-update')">