diy-template-components 1.0.30 → 1.0.32

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 CHANGED
@@ -1139,7 +1139,7 @@ function OptionList({
1139
1139
  data: {
1140
1140
  link: headerData?.loginCtaLink,
1141
1141
  isLink: 1,
1142
- value: countryCode === "KR" ? "로그인" : 'Login',
1142
+ value: countryCode === 'KR' ? '로그인' : 'Login',
1143
1143
  isExternal: 1
1144
1144
  },
1145
1145
  type: 'primary',
@@ -5948,7 +5948,8 @@ const formatCurrency = (countryCode, value, currencySymbol) => {
5948
5948
  function CourseCard({
5949
5949
  card,
5950
5950
  countryCode,
5951
- currencySymbol
5951
+ currencySymbol,
5952
+ utmParams
5952
5953
  }) {
5953
5954
  const classes = useCourseStyles();
5954
5955
  const {
@@ -5998,7 +5999,7 @@ function CourseCard({
5998
5999
  className: classes.courseCardStrikePrice
5999
6000
  }, /*#__PURE__*/React.createElement("span", null, price), " ", discount > 0 && discount + `% ${offText}`) : null), /*#__PURE__*/React.createElement("a", {
6000
6001
  className: classes.coursesAnchorTag,
6001
- href: isEdit ? null : card?.shareableLink
6002
+ href: isEdit ? null : utmParams ? card?.shareableLink + `?flyy_utm_referrer=${utmParams}` : card?.shareableLink
6002
6003
  }, /*#__PURE__*/React.createElement("div", {
6003
6004
  className: classes.courseCardBuyBtn
6004
6005
  }, buyNowText)))));
@@ -6028,6 +6029,7 @@ function courses({
6028
6029
  isMobile
6029
6030
  });
6030
6031
  const [nodeData] = sectionData?.components;
6032
+ const [utmParams, setUtmParams] = useState('');
6031
6033
  const handleApiCall = () => {
6032
6034
  if (baseURLs) {
6033
6035
  getCourseList(baseURLs, hashToken).then(response => {
@@ -6073,6 +6075,11 @@ function courses({
6073
6075
  else {
6074
6076
  handleApiCall();
6075
6077
  }
6078
+ const params = new URLSearchParams(window.location.search);
6079
+ const utmParams = params.get('flyy_utm_referrer');
6080
+ if (utmParams) {
6081
+ setUtmParams(utmParams);
6082
+ }
6076
6083
  }, []);
6077
6084
  const settings = {
6078
6085
  className: classes.slickContainer,
@@ -6110,7 +6117,8 @@ function courses({
6110
6117
  key: index,
6111
6118
  card: card,
6112
6119
  countryCode: countryCode,
6113
- currencySymbol: currencySymbol
6120
+ currencySymbol: currencySymbol,
6121
+ utmParams: utmParams
6114
6122
  })) : fallBackImages?.map((dt, ind) => {
6115
6123
  return /*#__PURE__*/React.createElement(Fragment, {
6116
6124
  key: ind