diy-template-components 0.2.65 → 0.2.66
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 +17 -9
- package/build/index.es.js.map +1 -1
- package/build/index.js +17 -9
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -1149,8 +1149,10 @@ const NextImageRenderer = ({
|
|
|
1149
1149
|
const {
|
|
1150
1150
|
isCustomWebsite,
|
|
1151
1151
|
pageData,
|
|
1152
|
-
isMobile
|
|
1152
|
+
isMobile,
|
|
1153
|
+
ASSET_PREFIX_URL
|
|
1153
1154
|
} = React.useContext(PageContext);
|
|
1155
|
+
console.log("pageRenderer wrapper", ASSET_PREFIX_URL);
|
|
1154
1156
|
try {
|
|
1155
1157
|
let {
|
|
1156
1158
|
refSetter,
|
|
@@ -1168,8 +1170,8 @@ const NextImageRenderer = ({
|
|
|
1168
1170
|
desktop: 1200
|
|
1169
1171
|
};
|
|
1170
1172
|
const dynamicWidth = isMobile ? breakpoints.mobile : breakpoints?.desktop;
|
|
1171
|
-
if (
|
|
1172
|
-
return `${
|
|
1173
|
+
if (ASSET_PREFIX_URL !== undefined) {
|
|
1174
|
+
return `${ASSET_PREFIX_URL}/_next/image?url=${src}&w=${width}&q=${quality || 75}`;
|
|
1173
1175
|
} else {
|
|
1174
1176
|
return `/_next/image?url=${src}&w=${width}&q=${quality || 75}`;
|
|
1175
1177
|
}
|
|
@@ -2083,9 +2085,11 @@ function PageRenderer$1({
|
|
|
2083
2085
|
isTutorWebsite = false,
|
|
2084
2086
|
extraProps,
|
|
2085
2087
|
hideLogin,
|
|
2086
|
-
isCustomWebsite
|
|
2088
|
+
isCustomWebsite,
|
|
2089
|
+
ASSET_PREFIX_URL = undefined
|
|
2087
2090
|
}) {
|
|
2088
2091
|
const theme = React.useMemo(() => getTheme(color, font), [color, font]);
|
|
2092
|
+
console.log("pageRenderer", ASSET_PREFIX_URL);
|
|
2089
2093
|
const navList = header?.navs;
|
|
2090
2094
|
const context = React.useMemo(() => ({
|
|
2091
2095
|
isMobile,
|
|
@@ -2104,8 +2108,9 @@ function PageRenderer$1({
|
|
|
2104
2108
|
extraProps,
|
|
2105
2109
|
hideLogin,
|
|
2106
2110
|
isCustomWebsite,
|
|
2107
|
-
_id
|
|
2108
|
-
|
|
2111
|
+
_id,
|
|
2112
|
+
ASSET_PREFIX_URL
|
|
2113
|
+
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, ASSET_PREFIX_URL]);
|
|
2109
2114
|
const Wrapper = SectionWrapper || React.Fragment;
|
|
2110
2115
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
2111
2116
|
theme: theme
|
|
@@ -8843,10 +8848,12 @@ function PageRenderer({
|
|
|
8843
8848
|
templateId,
|
|
8844
8849
|
isTutorWebsite = false,
|
|
8845
8850
|
extraProps,
|
|
8846
|
-
hideLogin
|
|
8851
|
+
hideLogin,
|
|
8852
|
+
ASSET_PREFIX_URL
|
|
8847
8853
|
}) {
|
|
8848
8854
|
const theme = React.useMemo(() => getTheme(color, font), [color, font]);
|
|
8849
8855
|
const navList = header?.navs;
|
|
8856
|
+
console.log("pageRenderer static", ASSET_PREFIX_URL);
|
|
8850
8857
|
const context = React.useMemo(() => ({
|
|
8851
8858
|
isMobile,
|
|
8852
8859
|
isLandingPages,
|
|
@@ -8864,8 +8871,9 @@ function PageRenderer({
|
|
|
8864
8871
|
extraProps,
|
|
8865
8872
|
hideLogin,
|
|
8866
8873
|
isCustomWebsite,
|
|
8867
|
-
_id
|
|
8868
|
-
|
|
8874
|
+
_id,
|
|
8875
|
+
ASSET_PREFIX_URL
|
|
8876
|
+
}), [isMobile, isLandingPages, layout, baseURLs, hashToken, isPreview, isEdit, templateId, navList, isMasterTemplate, basePath, validations, isTutorWebsite, extraProps, hideLogin, _id, ASSET_PREFIX_URL]);
|
|
8869
8877
|
const Wrapper = SectionWrapper || React.Fragment;
|
|
8870
8878
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
8871
8879
|
theme: theme
|