diy-template-components 1.0.34 → 1.0.36
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.
- package/build/index.es.js +13 -5
- package/build/index.es.js.map +1 -1
- package/build/index.js +13 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -5964,7 +5964,8 @@ const formatCurrency = (countryCode, value, currencySymbol) => {
|
|
|
5964
5964
|
function CourseCard({
|
|
5965
5965
|
card,
|
|
5966
5966
|
countryCode,
|
|
5967
|
-
currencySymbol
|
|
5967
|
+
currencySymbol,
|
|
5968
|
+
utmParams
|
|
5968
5969
|
}) {
|
|
5969
5970
|
const classes = useCourseStyles();
|
|
5970
5971
|
const {
|
|
@@ -5974,7 +5975,7 @@ function CourseCard({
|
|
|
5974
5975
|
const defaultCardImg = 'https://cp-assets-public.s3.ap-south-1.amazonaws.com/cams/cards-icon/default_course.png';
|
|
5975
5976
|
const price = formatCurrency(countryCode, card?.price, currencySymbol);
|
|
5976
5977
|
const finalPrice = formatCurrency(countryCode, card?.finalPrice, currencySymbol);
|
|
5977
|
-
const buyNowText = countryCode === 'KR' ? '
|
|
5978
|
+
const buyNowText = countryCode === 'KR' ? '수강신청하기' : 'Buy Now';
|
|
5978
5979
|
const offText = countryCode === 'KR' ? '할인' : 'OFF';
|
|
5979
5980
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5980
5981
|
className: classes.singleCard
|
|
@@ -6014,7 +6015,7 @@ function CourseCard({
|
|
|
6014
6015
|
className: classes.courseCardStrikePrice
|
|
6015
6016
|
}, /*#__PURE__*/React__default["default"].createElement("span", null, price), " ", discount > 0 && discount + `% ${offText}`) : null), /*#__PURE__*/React__default["default"].createElement("a", {
|
|
6016
6017
|
className: classes.coursesAnchorTag,
|
|
6017
|
-
href: isEdit ? null : card?.shareableLink
|
|
6018
|
+
href: isEdit ? null : utmParams ? card?.shareableLink + `?flyy_utm_referrer=${utmParams}` : card?.shareableLink
|
|
6018
6019
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6019
6020
|
className: classes.courseCardBuyBtn
|
|
6020
6021
|
}, buyNowText)))));
|
|
@@ -6044,6 +6045,7 @@ function courses({
|
|
|
6044
6045
|
isMobile
|
|
6045
6046
|
});
|
|
6046
6047
|
const [nodeData] = sectionData?.components;
|
|
6048
|
+
const [utmParams, setUtmParams] = React.useState('');
|
|
6047
6049
|
const handleApiCall = () => {
|
|
6048
6050
|
if (baseURLs) {
|
|
6049
6051
|
getCourseList(baseURLs, hashToken).then(response => {
|
|
@@ -6089,6 +6091,11 @@ function courses({
|
|
|
6089
6091
|
else {
|
|
6090
6092
|
handleApiCall();
|
|
6091
6093
|
}
|
|
6094
|
+
const params = new URLSearchParams(window.location.search);
|
|
6095
|
+
const utmParams = params.get('flyy_utm_referrer');
|
|
6096
|
+
if (utmParams) {
|
|
6097
|
+
setUtmParams(utmParams);
|
|
6098
|
+
}
|
|
6092
6099
|
}, []);
|
|
6093
6100
|
const settings = {
|
|
6094
6101
|
className: classes.slickContainer,
|
|
@@ -6126,7 +6133,8 @@ function courses({
|
|
|
6126
6133
|
key: index,
|
|
6127
6134
|
card: card,
|
|
6128
6135
|
countryCode: countryCode,
|
|
6129
|
-
currencySymbol: currencySymbol
|
|
6136
|
+
currencySymbol: currencySymbol,
|
|
6137
|
+
utmParams: utmParams
|
|
6130
6138
|
})) : fallBackImages?.map((dt, ind) => {
|
|
6131
6139
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
|
6132
6140
|
key: ind
|
|
@@ -8101,7 +8109,7 @@ const SingleVideoSlide = props => {
|
|
|
8101
8109
|
};
|
|
8102
8110
|
const effectivePrice = formatCurrency(countryCode, data?.effectivePrice, currencySymbol);
|
|
8103
8111
|
const finalPrice = formatCurrency(countryCode, data?.price, currencySymbol);
|
|
8104
|
-
const buyNowText = countryCode === 'KR' ? '
|
|
8112
|
+
const buyNowText = countryCode === 'KR' ? '수강신청하기' : 'BUY NOW';
|
|
8105
8113
|
const handleReadMoreText = () => {
|
|
8106
8114
|
if (countryCode === 'KR') {
|
|
8107
8115
|
return '더 보기';
|