ublo-lib 1.19.20 → 1.19.22

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.
@@ -18,7 +18,7 @@ export function filterProducts(products, weekNumber) {
18
18
  if (weekNumber !== null) {
19
19
  return products.filter((product) => {
20
20
  const { weeks = [] } = product.document;
21
- return weeks.includes(weekNumber);
21
+ return weeks.length === 0 || weeks.includes(weekNumber);
22
22
  });
23
23
  }
24
24
  return products.reduce((acc, product) => {
@@ -27,7 +27,8 @@ const useBookingLinks = (cart, multipleVillages, setupCallback, channel = "ESF")
27
27
  const {
28
28
  breadcrumb,
29
29
  config,
30
- lang
30
+ lang,
31
+ path
31
32
  } = useUbloContext();
32
33
  const hasLangPrefix = config.langPrefix.links;
33
34
  const bookingLang = lang === "fr" ? "fr" : "en";
@@ -39,6 +40,6 @@ const useBookingLinks = (cart, multipleVillages, setupCallback, channel = "ESF")
39
40
  setupCallback?.();
40
41
  };
41
42
  run();
42
- }, [bookingLang, breadcrumb, cart, channel, hasLangPrefix, multipleVillages, setupCallback]);
43
+ }, [bookingLang, breadcrumb, cart, channel, hasLangPrefix, multipleVillages, path, setupCallback]);
43
44
  };
44
45
  export default useBookingLinks;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.19.20",
3
+ "version": "1.19.22",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.1.5",
6
6
  "leaflet": "^1.9.1",