diy-template-components 1.0.31 → 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
@@ -237,8 +237,7 @@ const useSectionStyles$a = createUseStyles(theme => ({
237
237
  height: '80px'
238
238
  },
239
239
  sideDrawerImg: {
240
- width: '40px',
241
- heigh: '40px'
240
+ width: '15%'
242
241
  },
243
242
  menuItem: {
244
243
  padding: '0'
@@ -5949,7 +5948,8 @@ const formatCurrency = (countryCode, value, currencySymbol) => {
5949
5948
  function CourseCard({
5950
5949
  card,
5951
5950
  countryCode,
5952
- currencySymbol
5951
+ currencySymbol,
5952
+ utmParams
5953
5953
  }) {
5954
5954
  const classes = useCourseStyles();
5955
5955
  const {
@@ -5999,7 +5999,7 @@ function CourseCard({
5999
5999
  className: classes.courseCardStrikePrice
6000
6000
  }, /*#__PURE__*/React.createElement("span", null, price), " ", discount > 0 && discount + `% ${offText}`) : null), /*#__PURE__*/React.createElement("a", {
6001
6001
  className: classes.coursesAnchorTag,
6002
- href: isEdit ? null : card?.shareableLink
6002
+ href: isEdit ? null : utmParams ? card?.shareableLink + `?flyy_utm_referrer=${utmParams}` : card?.shareableLink
6003
6003
  }, /*#__PURE__*/React.createElement("div", {
6004
6004
  className: classes.courseCardBuyBtn
6005
6005
  }, buyNowText)))));
@@ -6029,6 +6029,7 @@ function courses({
6029
6029
  isMobile
6030
6030
  });
6031
6031
  const [nodeData] = sectionData?.components;
6032
+ const [utmParams, setUtmParams] = useState('');
6032
6033
  const handleApiCall = () => {
6033
6034
  if (baseURLs) {
6034
6035
  getCourseList(baseURLs, hashToken).then(response => {
@@ -6074,6 +6075,11 @@ function courses({
6074
6075
  else {
6075
6076
  handleApiCall();
6076
6077
  }
6078
+ const params = new URLSearchParams(window.location.search);
6079
+ const utmParams = params.get('flyy_utm_referrer');
6080
+ if (utmParams) {
6081
+ setUtmParams(utmParams);
6082
+ }
6077
6083
  }, []);
6078
6084
  const settings = {
6079
6085
  className: classes.slickContainer,
@@ -6111,7 +6117,8 @@ function courses({
6111
6117
  key: index,
6112
6118
  card: card,
6113
6119
  countryCode: countryCode,
6114
- currencySymbol: currencySymbol
6120
+ currencySymbol: currencySymbol,
6121
+ utmParams: utmParams
6115
6122
  })) : fallBackImages?.map((dt, ind) => {
6116
6123
  return /*#__PURE__*/React.createElement(Fragment, {
6117
6124
  key: ind