ublo-lib 1.40.10 → 1.40.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"cart-dialog.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog.js"],"names":[],"mappings":";AAsBA;;;;;;;;;;4CAqEC"}
1
+ {"version":3,"file":"cart-dialog.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog.js"],"names":[],"mappings":";AAuBA;;;;;;;;;;4CAyEC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useUbloContext } from "ublo/with-ublo";
2
3
  import Dialog from "dt-design-system/es/dialog";
3
4
  import ESF from "./esf";
4
5
  import ESFCustom from "./esf-custom";
@@ -19,6 +20,8 @@ const products = {
19
20
  };
20
21
  const STAND_PRODUCTS = ["VAKARIO", "ELLOHA-ACTIVITY"];
21
22
  const CartDialog = ({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath, hasImage, hideSkiPassesStay, }) => {
23
+ const { lang, config } = useUbloContext();
24
+ const hasLangPrefix = langPrefix.links;
22
25
  if (!cart)
23
26
  return null;
24
27
  const { cart: cartContent, kind, data } = cart;
@@ -27,7 +30,9 @@ const CartDialog = ({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath
27
30
  if (!cartContent?.cart?.orders?.[convertedKind]?.[0]) {
28
31
  return null;
29
32
  }
30
- const cartUrl = shortcuts.cartItem.path;
33
+ const cartUrl = hasLangPrefix
34
+ ? `/${lang}${shortcuts.cartItem.path}`
35
+ : shortcuts.cartItem.path;
31
36
  const orders = cartContent.cart.orders[convertedKind];
32
37
  const { inscriptions } = orders[orders.length - 1];
33
38
  const newItem = inscriptions[inscriptions.length - 1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.40.10",
3
+ "version": "1.40.11",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.10.8",
6
6
  "leaflet": "^1.9.1",