diy-template-components 0.2.66 → 0.2.67
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 +14 -19
- package/build/index.es.js.map +1 -1
- package/build/index.js +14 -19
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -1149,10 +1149,8 @@ const NextImageRenderer = ({
|
|
|
1149
1149
|
const {
|
|
1150
1150
|
isCustomWebsite,
|
|
1151
1151
|
pageData,
|
|
1152
|
-
isMobile
|
|
1153
|
-
ASSET_PREFIX_URL
|
|
1152
|
+
isMobile
|
|
1154
1153
|
} = React.useContext(PageContext);
|
|
1155
|
-
console.log("pageRenderer wrapper", ASSET_PREFIX_URL);
|
|
1156
1154
|
try {
|
|
1157
1155
|
let {
|
|
1158
1156
|
refSetter,
|
|
@@ -1170,8 +1168,8 @@ const NextImageRenderer = ({
|
|
|
1170
1168
|
desktop: 1200
|
|
1171
1169
|
};
|
|
1172
1170
|
const dynamicWidth = isMobile ? breakpoints.mobile : breakpoints?.desktop;
|
|
1173
|
-
if (
|
|
1174
|
-
return `${
|
|
1171
|
+
if (process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX !== undefined) {
|
|
1172
|
+
return `${process.env.NEXT_PUBLIC_ENV_ASSET_PREFIX}/_next/image?url=${src}&w=${width}&q=${quality || 75}`;
|
|
1175
1173
|
} else {
|
|
1176
1174
|
return `/_next/image?url=${src}&w=${width}&q=${quality || 75}`;
|
|
1177
1175
|
}
|
|
@@ -2085,11 +2083,9 @@ function PageRenderer$1({
|
|
|
2085
2083
|
isTutorWebsite = false,
|
|
2086
2084
|
extraProps,
|
|
2087
2085
|
hideLogin,
|
|
2088
|
-
isCustomWebsite
|
|
2089
|
-
ASSET_PREFIX_URL = undefined
|
|
2086
|
+
isCustomWebsite
|
|
2090
2087
|
}) {
|
|
2091
2088
|
const theme = React.useMemo(() => getTheme(color, font), [color, font]);
|
|
2092
|
-
console.log("pageRenderer", ASSET_PREFIX_URL);
|
|
2093
2089
|
const navList = header?.navs;
|
|
2094
2090
|
const context = React.useMemo(() => ({
|
|
2095
2091
|
isMobile,
|
|
@@ -2108,9 +2104,8 @@ function PageRenderer$1({
|
|
|
2108
2104
|
extraProps,
|
|
2109
2105
|
hideLogin,
|
|
2110
2106
|
isCustomWebsite,
|
|
2111
|
-
_id
|
|
2112
|
-
|
|
2113
|
-
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, ASSET_PREFIX_URL]);
|
|
2107
|
+
_id
|
|
2108
|
+
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id]);
|
|
2114
2109
|
const Wrapper = SectionWrapper || React.Fragment;
|
|
2115
2110
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
2116
2111
|
theme: theme
|
|
@@ -7123,6 +7118,9 @@ const SingleVideoSlide$1 = props => {
|
|
|
7123
7118
|
};
|
|
7124
7119
|
const checkIfOfferIsValid = () => moment__default["default"]().diff(moment__default["default"](props.data.offerPriceEndDate)) < 0;
|
|
7125
7120
|
const checkForShowDiscount = () => {
|
|
7121
|
+
if (checkIfOfferIsValid() && data?.discount) {
|
|
7122
|
+
return true;
|
|
7123
|
+
}
|
|
7126
7124
|
if (props.data.endDate === null || checkIfOfferIsValid()) {
|
|
7127
7125
|
if (data.discount > 0 && data.offerPriceValidFor === 0) {
|
|
7128
7126
|
return true;
|
|
@@ -7158,7 +7156,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
7158
7156
|
className: classes.iframeSuperContainer
|
|
7159
7157
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7160
7158
|
className: classes.videoDetails
|
|
7161
|
-
}, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) &&
|
|
7159
|
+
}, data?.isPaid !== 0 && (checkIfOfferIsValid() || data.offerPriceValidFor > 0) && /*#__PURE__*/React__default["default"].createElement("div", null, data.offerPriceValidFor - conversions > 0 && data.discount && (data.offerPriceEndDate ? checkIfOfferIsValid() : true) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7162
7160
|
className: classes.bannerContainer
|
|
7163
7161
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7164
7162
|
className: classes.bannerContainerText
|
|
@@ -7206,7 +7204,7 @@ const SingleVideoSlide$1 = props => {
|
|
|
7206
7204
|
}
|
|
7207
7205
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7208
7206
|
className: classes.courseViewContainer
|
|
7209
|
-
}, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor
|
|
7207
|
+
}, data.isPaid !== 0 && checkIfOfferIsValid() && (data.offerPriceValidFor === 0 ? data.offerPriceValidFor - conversions > 0 : true) && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7210
7208
|
className: classes.offerText
|
|
7211
7209
|
}, "Offer Ends in", ' ', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
7212
7210
|
className: classes.courseDetailTime
|
|
@@ -8848,12 +8846,10 @@ function PageRenderer({
|
|
|
8848
8846
|
templateId,
|
|
8849
8847
|
isTutorWebsite = false,
|
|
8850
8848
|
extraProps,
|
|
8851
|
-
hideLogin
|
|
8852
|
-
ASSET_PREFIX_URL
|
|
8849
|
+
hideLogin
|
|
8853
8850
|
}) {
|
|
8854
8851
|
const theme = React.useMemo(() => getTheme(color, font), [color, font]);
|
|
8855
8852
|
const navList = header?.navs;
|
|
8856
|
-
console.log("pageRenderer static", ASSET_PREFIX_URL);
|
|
8857
8853
|
const context = React.useMemo(() => ({
|
|
8858
8854
|
isMobile,
|
|
8859
8855
|
isLandingPages,
|
|
@@ -8871,9 +8867,8 @@ function PageRenderer({
|
|
|
8871
8867
|
extraProps,
|
|
8872
8868
|
hideLogin,
|
|
8873
8869
|
isCustomWebsite,
|
|
8874
|
-
_id
|
|
8875
|
-
|
|
8876
|
-
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, ASSET_PREFIX_URL]);
|
|
8870
|
+
_id
|
|
8871
|
+
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id]);
|
|
8877
8872
|
const Wrapper = SectionWrapper || React.Fragment;
|
|
8878
8873
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
8879
8874
|
theme: theme
|