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.js CHANGED
@@ -253,8 +253,7 @@ const useSectionStyles$a = createUseStyles(theme => ({
253
253
  height: '80px'
254
254
  },
255
255
  sideDrawerImg: {
256
- width: '40px',
257
- heigh: '40px'
256
+ width: '15%'
258
257
  },
259
258
  menuItem: {
260
259
  padding: '0'
@@ -5965,7 +5964,8 @@ const formatCurrency = (countryCode, value, currencySymbol) => {
5965
5964
  function CourseCard({
5966
5965
  card,
5967
5966
  countryCode,
5968
- currencySymbol
5967
+ currencySymbol,
5968
+ utmParams
5969
5969
  }) {
5970
5970
  const classes = useCourseStyles();
5971
5971
  const {
@@ -6015,7 +6015,7 @@ function CourseCard({
6015
6015
  className: classes.courseCardStrikePrice
6016
6016
  }, /*#__PURE__*/React__default["default"].createElement("span", null, price), " ", discount > 0 && discount + `% ${offText}`) : null), /*#__PURE__*/React__default["default"].createElement("a", {
6017
6017
  className: classes.coursesAnchorTag,
6018
- href: isEdit ? null : card?.shareableLink
6018
+ href: isEdit ? null : utmParams ? card?.shareableLink + `?flyy_utm_referrer=${utmParams}` : card?.shareableLink
6019
6019
  }, /*#__PURE__*/React__default["default"].createElement("div", {
6020
6020
  className: classes.courseCardBuyBtn
6021
6021
  }, buyNowText)))));
@@ -6045,6 +6045,7 @@ function courses({
6045
6045
  isMobile
6046
6046
  });
6047
6047
  const [nodeData] = sectionData?.components;
6048
+ const [utmParams, setUtmParams] = React.useState('');
6048
6049
  const handleApiCall = () => {
6049
6050
  if (baseURLs) {
6050
6051
  getCourseList(baseURLs, hashToken).then(response => {
@@ -6090,6 +6091,11 @@ function courses({
6090
6091
  else {
6091
6092
  handleApiCall();
6092
6093
  }
6094
+ const params = new URLSearchParams(window.location.search);
6095
+ const utmParams = params.get('flyy_utm_referrer');
6096
+ if (utmParams) {
6097
+ setUtmParams(utmParams);
6098
+ }
6093
6099
  }, []);
6094
6100
  const settings = {
6095
6101
  className: classes.slickContainer,
@@ -6127,7 +6133,8 @@ function courses({
6127
6133
  key: index,
6128
6134
  card: card,
6129
6135
  countryCode: countryCode,
6130
- currencySymbol: currencySymbol
6136
+ currencySymbol: currencySymbol,
6137
+ utmParams: utmParams
6131
6138
  })) : fallBackImages?.map((dt, ind) => {
6132
6139
  return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
6133
6140
  key: ind