mirror of
https://github.com/FoggedLens/deflock.git
synced 2026-07-14 15:57:20 +02:00
cb5a531391
Accept cart/modal theme-refresh limitation per BuyButton.js docs (Option A) Looked up the actual Shopify BuyButton.js source and docs instead of guessing at API surface. Confirmed there is no documented destroy() or updateConfig() method — createComponent(type, config) is the only supported way to create or change what's rendered, and it auto-creates a separate cart + "cart toggle" component tied to that call, not a child of the node you pass in. - Revert to plain clear-and-recreate (container.innerHTML + createComponent) for both collection switches and theme toggles — the only pattern the SDK actually documents - Remove all destroy()/updateConfig()/ui.components calls added in prior revisions; they relied on unverified internal APIs and were producing empty renders more often than not - Keep the cached client (getShopifyUI(), built once) to avoid re-risking the "empty cart on page load" issue on every toggle - Keep the shopifyRenderToken guard against overlapping async renders - Document the accepted limitation in code: product grid re-themes live on every toggle; cart drawer and product modal pick up a new theme on next page load only, since there's no documented way to re-theme those singletons without a full reload Files changed: src/pages/StorePage.vue