@fluid-app/portal-sdk 0.1.104 → 0.1.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1756,6 +1756,23 @@ function ShopScreen({ background, textColor, accentColor, padding, borderRadius,
1756
1756
  className: "flex items-center gap-4",
1757
1757
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CartButton, {})
1758
1758
  }), []));
1759
+ (0, react.useEffect)(() => {
1760
+ if (!countryCode) return;
1761
+ const sdk = () => window.FairShareSDK;
1762
+ if (sdk()) {
1763
+ sdk().updateLocaleSettings({ country: countryCode });
1764
+ return;
1765
+ }
1766
+ let attempts = 0;
1767
+ const id = setInterval(() => {
1768
+ attempts++;
1769
+ if (sdk()) {
1770
+ sdk().updateLocaleSettings({ country: countryCode });
1771
+ clearInterval(id);
1772
+ } else if (attempts >= 50) clearInterval(id);
1773
+ }, 100);
1774
+ return () => clearInterval(id);
1775
+ }, [countryCode]);
1759
1776
  const productId = currentSlug.split("/")[1] ?? null;
1760
1777
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1761
1778
  ...divProps,
@@ -1803,4 +1820,4 @@ Object.defineProperty(exports, "shopScreenPropertySchema", {
1803
1820
  }
1804
1821
  });
1805
1822
 
1806
- //# sourceMappingURL=ShopScreen-56tH1PoX.cjs.map
1823
+ //# sourceMappingURL=ShopScreen-Cbv-zrHK.cjs.map