ublo-lib 1.31.27 → 1.31.28

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.
@@ -24,6 +24,7 @@ export default function useTunnel({
24
24
  lang,
25
25
  breadcrumb
26
26
  } = useUbloContext();
27
+ const [started, setStared] = React.useState(false);
27
28
  const {
28
29
  path: esfPath
29
30
  } = multipleVillages ? breadcrumb?.next : breadcrumb;
@@ -36,10 +37,6 @@ export default function useTunnel({
36
37
  const categoryCode = window.sessionStorage.getItem("categoryCode") || undefined;
37
38
  window.MseM?.onLoad(() => {
38
39
  window.requestAnimationFrame(() => {
39
- const container = document.querySelector(groundedTo);
40
- if (container.innerHTML !== "") {
41
- container.innerHTML = "";
42
- }
43
40
  window.MseM.tunnel({
44
41
  channel,
45
42
  resort,
@@ -50,14 +47,15 @@ export default function useTunnel({
50
47
  analytics: Plausible.callback,
51
48
  categoryCode
52
49
  });
50
+ setStared(true);
53
51
  });
54
52
  });
55
53
  };
56
- if (enableCustomOffers && customOffers !== undefined || !enableCustomOffers) {
54
+ if (!started && (enableCustomOffers && customOffers !== undefined || !enableCustomOffers)) {
57
55
  startTunnel();
58
56
  }
59
57
  }
60
- }, [channel, cmsMode, customOffers, enableCustomOffers, esfUrl, groundedTo, integration, widgetLang]);
58
+ }, [channel, cmsMode, customOffers, enableCustomOffers, esfUrl, groundedTo, integration, started, widgetLang]);
61
59
  }
62
60
  async function loadWidgetMseM(integration) {
63
61
  const source = integration ? "https://widget-integration.msem.tech/static/js/widget-msem.js" : "https://widget.msem.tech/static/js/widget-msem.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.31.27",
3
+ "version": "1.31.28",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.8.3",
6
6
  "leaflet": "^1.9.1",