Shop

window.addEventListener(“load”, function () {
const root = document.getElementById(“shop-root”);
if (!root) return;

const api = window[“ShopVC”];
if (!api) {
console.error(“ShopVC is not available”);
return;
}

let initial = window.__VC_PROPS__?.[“ShopVC”] || {};
const ssrUrl = “shop” === “home”
? “/”
: “/” + “shop”;

initial.router ??= “memory”;
initial.initialEntries ??= [ssrUrl];

const hasSSR = root.childElementCount > 0;

if (hasSSR) api.hydrate(root, initial);
else api.mount(root, initial);
});

Showing 1–16 of 28 results