ublo-lib 1.42.5 → 1.42.6
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-inner.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog-inner.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cart-dialog-inner.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog-inner.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;;;4CAsGC"}
|
|
@@ -18,9 +18,9 @@ const CartDialogInner = ({ kind, title, image, thumbnail, price, label, contentT
|
|
|
18
18
|
setStay(JSON.parse(sessionStay));
|
|
19
19
|
}, []);
|
|
20
20
|
const formatOptions = { day: "2-digit", month: "long", year: "numeric" };
|
|
21
|
-
const formattedStayFrom = new Date(stay.from).toLocaleDateString(lang, formatOptions);
|
|
22
|
-
const formattedStayTo = new Date(stay.to).toLocaleDateString(lang, formatOptions);
|
|
21
|
+
const formattedStayFrom = stay?.from && new Date(stay.from).toLocaleDateString(lang, formatOptions);
|
|
22
|
+
const formattedStayTo = stay?.to && new Date(stay.to).toLocaleDateString(lang, formatOptions);
|
|
23
23
|
const buttonClasses = classNames(styles.contentButton, styles.contentButtonContinue);
|
|
24
|
-
return (_jsxs("div", { className: styles.inner, children: [_jsxs("div", { className: styles.title, children: [_jsx(Icons.CheckCircle, { className: styles.titleIcon }), _jsx("div", { className: styles.titleText, children: title })] }), _jsxs("div", { className: styles.content, children: [image && (_jsx("div", { className: styles.contentLeft, children: _jsx(Image, { className: styles.productImage, src: image, width: 320, height: 200, placeholder: thumbnail ? "blur" : undefined, blurDataURL: thumbnail, alt: "" }) })), _jsxs("div", { className: styles.contentRight, children: [_jsxs("div", { className: styles.wrapper, children: [label && (_jsx("div", { className: styles.contentLabel, dangerouslySetInnerHTML: { __html: label } })), price && _jsxs("div", { className: styles.price, children: [price, " \u20AC"] })] }), contentTitle && (_jsx("div", { className: styles.contentTitle, children: contentTitle })), !hideSkiPassesStay && (_jsxs("div", { className: styles.stay, children: [formattedStayFrom, " \uA537 ", formattedStayTo] })), paxPlan && _jsx("div", { className: styles.paxPlan, children: paxPlan }), _jsxs("div", { className: styles.contentButtons, children: [_jsx(Button, { tag: Link, href: hasLangPrefix ? `/${lang}/` : "/", className: buttonClasses, variant: "secondary", onClick: closeDialog, children: message(lang, "cart-dialog-continue") }), _jsx(Button, { className: styles.contentButton, onClick: goToCart, children: message(lang, "cart-dialog-go-to-cart") })] })] })] }), kind && (_jsx(CrossSellingOffers, { kind: kind, cart: cart, closeDialog: closeDialog, zoneId: zoneId, zonePath: zonePath }))] }));
|
|
24
|
+
return (_jsxs("div", { className: styles.inner, children: [_jsxs("div", { className: styles.title, children: [_jsx(Icons.CheckCircle, { className: styles.titleIcon }), _jsx("div", { className: styles.titleText, children: title })] }), _jsxs("div", { className: styles.content, children: [image && (_jsx("div", { className: styles.contentLeft, children: _jsx(Image, { className: styles.productImage, src: image, width: 320, height: 200, placeholder: thumbnail ? "blur" : undefined, blurDataURL: thumbnail, alt: "" }) })), _jsxs("div", { className: styles.contentRight, children: [_jsxs("div", { className: styles.wrapper, children: [label && (_jsx("div", { className: styles.contentLabel, dangerouslySetInnerHTML: { __html: label } })), price && _jsxs("div", { className: styles.price, children: [price, " \u20AC"] })] }), contentTitle && (_jsx("div", { className: styles.contentTitle, children: contentTitle })), !hideSkiPassesStay && formattedStayFrom && formattedStayTo && (_jsxs("div", { className: styles.stay, children: [formattedStayFrom, " \uA537 ", formattedStayTo] })), paxPlan && _jsx("div", { className: styles.paxPlan, children: paxPlan }), _jsxs("div", { className: styles.contentButtons, children: [_jsx(Button, { tag: Link, href: hasLangPrefix ? `/${lang}/` : "/", className: buttonClasses, variant: "secondary", onClick: closeDialog, children: message(lang, "cart-dialog-continue") }), _jsx(Button, { className: styles.contentButton, onClick: goToCart, children: message(lang, "cart-dialog-go-to-cart") })] })] })] }), kind && (_jsx(CrossSellingOffers, { kind: kind, cart: cart, closeDialog: closeDialog, zoneId: zoneId, zonePath: zonePath }))] }));
|
|
25
25
|
};
|
|
26
26
|
export default CartDialogInner;
|