diy-template-components 1.0.14 → 1.0.16
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 +60 -29
- package/build/index.es.js.map +1 -1
- package/build/index.js +60 -29
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -98,8 +98,7 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
98
98
|
pointerEvents: 'auto',
|
|
99
99
|
cursor: 'default',
|
|
100
100
|
position: 'relative',
|
|
101
|
-
height: '55px'
|
|
102
|
-
width: '100%'
|
|
101
|
+
height: '55px'
|
|
103
102
|
},
|
|
104
103
|
optionsContainer: {
|
|
105
104
|
display: 'flex',
|
|
@@ -142,8 +141,7 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
142
141
|
display: 'flex',
|
|
143
142
|
position: 'relative',
|
|
144
143
|
maxHeight: '55px',
|
|
145
|
-
alignItems: 'center'
|
|
146
|
-
width: '30%'
|
|
144
|
+
alignItems: 'center'
|
|
147
145
|
},
|
|
148
146
|
imageDivImageMobile: {},
|
|
149
147
|
imageDivImageNext: {
|
|
@@ -157,7 +155,7 @@ const useSectionStyles$a = createUseStyles(theme => ({
|
|
|
157
155
|
imageAnchorMobile: {
|
|
158
156
|
pointerEvents: 'auto',
|
|
159
157
|
cursor: 'default',
|
|
160
|
-
width: '100%',
|
|
158
|
+
// width: '100%',
|
|
161
159
|
maxWidth: '85px',
|
|
162
160
|
cursor: 'default',
|
|
163
161
|
height: '46px',
|
|
@@ -1042,6 +1040,46 @@ function OptionList({
|
|
|
1042
1040
|
};
|
|
1043
1041
|
const tabData = tabsDataModifier();
|
|
1044
1042
|
const classes = useSectionStyles$a();
|
|
1043
|
+
const isAndroidDelisted = headerData?.isAndroidDelisted;
|
|
1044
|
+
const apkURL = headerData?.apkURL;
|
|
1045
|
+
const downloadApkURL = isAndroidDelisted && apkURL ? apkURL : null;
|
|
1046
|
+
console.log(downloadApkURL, headerData, 'sakshat header desktop');
|
|
1047
|
+
const renderDownloadAppButton = () => {
|
|
1048
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, apkURL && /*#__PURE__*/React.createElement(Button, {
|
|
1049
|
+
data: {
|
|
1050
|
+
link: downloadApkURL,
|
|
1051
|
+
isLink: 1,
|
|
1052
|
+
value: 'Download App',
|
|
1053
|
+
isExternal: 1
|
|
1054
|
+
},
|
|
1055
|
+
type: 'primary',
|
|
1056
|
+
size: 'small',
|
|
1057
|
+
target: 'blank',
|
|
1058
|
+
rel: null,
|
|
1059
|
+
styling: isMobile ? {
|
|
1060
|
+
margin: '0 40px'
|
|
1061
|
+
} : {}
|
|
1062
|
+
}));
|
|
1063
|
+
};
|
|
1064
|
+
const renderAppDownloadLinks = () => {
|
|
1065
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1066
|
+
className: classes.socialBtn
|
|
1067
|
+
}, headerData?.androidURL ? /*#__PURE__*/React.createElement("a", {
|
|
1068
|
+
href: headerData?.androidURL,
|
|
1069
|
+
target: "_blank",
|
|
1070
|
+
className: classes.socialBtnItems
|
|
1071
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1072
|
+
src: playStore,
|
|
1073
|
+
alt: "playStore"
|
|
1074
|
+
})) : null, headerData?.iosUrl ? /*#__PURE__*/React.createElement("a", {
|
|
1075
|
+
target: "_blank",
|
|
1076
|
+
href: headerData?.iosUrl,
|
|
1077
|
+
className: classes.socialBtnItems
|
|
1078
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1079
|
+
src: appStore,
|
|
1080
|
+
alt: "appStore"
|
|
1081
|
+
})) : null);
|
|
1082
|
+
};
|
|
1045
1083
|
return /*#__PURE__*/React.createElement("div", {
|
|
1046
1084
|
className: classes.listSection
|
|
1047
1085
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1065,25 +1103,9 @@ function OptionList({
|
|
|
1065
1103
|
list: moreContent,
|
|
1066
1104
|
label: 'More',
|
|
1067
1105
|
icon: arrowDown
|
|
1068
|
-
}) : null, isTutorWebsite && !headerData?.navs ? /*#__PURE__*/React.createElement(
|
|
1069
|
-
className: classes.socialBtn
|
|
1070
|
-
}, headerData?.androidURL ? /*#__PURE__*/React.createElement("a", {
|
|
1071
|
-
href: headerData?.androidURL,
|
|
1072
|
-
target: "_blank",
|
|
1073
|
-
className: classes.socialBtnItems
|
|
1074
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
1075
|
-
src: playStore,
|
|
1076
|
-
alt: "playStore"
|
|
1077
|
-
})) : null, headerData?.iosUrl ? /*#__PURE__*/React.createElement("a", {
|
|
1078
|
-
target: "_blank",
|
|
1079
|
-
href: headerData?.iosUrl,
|
|
1080
|
-
className: classes.socialBtnItems
|
|
1081
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
1082
|
-
src: appStore,
|
|
1083
|
-
alt: "appStore"
|
|
1084
|
-
})) : null) : null, isMobile ? headerData?.appLink && /*#__PURE__*/React.createElement(Button, {
|
|
1106
|
+
}) : null, isTutorWebsite && /*#__PURE__*/React.createElement(React.Fragment, null, isAndroidDelisted ? /*#__PURE__*/React.createElement(React.Fragment, null, renderDownloadAppButton()) : /*#__PURE__*/React.createElement(React.Fragment, null, !headerData?.navs && renderAppDownloadLinks())), isMobile ? downloadApkURL || headerData?.appLink && /*#__PURE__*/React.createElement(Button, {
|
|
1085
1107
|
data: {
|
|
1086
|
-
link: headerData?.appLink,
|
|
1108
|
+
link: downloadApkURL ? downloadApkURL : headerData?.appLink,
|
|
1087
1109
|
isLink: 1,
|
|
1088
1110
|
value: 'Download App',
|
|
1089
1111
|
isExternal: 1
|
|
@@ -1140,11 +1162,6 @@ const NextImageRenderer = ({
|
|
|
1140
1162
|
pageData,
|
|
1141
1163
|
isMobile
|
|
1142
1164
|
} = useContext(PageContext);
|
|
1143
|
-
|
|
1144
|
-
// checkif src url is encoded or not, if not encode it
|
|
1145
|
-
if (src && src.includes(' ')) {
|
|
1146
|
-
src = encodeURI(src);
|
|
1147
|
-
}
|
|
1148
1165
|
try {
|
|
1149
1166
|
let {
|
|
1150
1167
|
refSetter,
|
|
@@ -1315,6 +1332,7 @@ function MobileHeader({
|
|
|
1315
1332
|
let androidUrl = null;
|
|
1316
1333
|
let downloadLink = null;
|
|
1317
1334
|
if (isTutorWebsite) {
|
|
1335
|
+
console.log(header, 'sakshat header mobile');
|
|
1318
1336
|
if (header?.iosUrl) {
|
|
1319
1337
|
iosUrl = /*#__PURE__*/React.createElement(Button, {
|
|
1320
1338
|
data: {
|
|
@@ -1356,7 +1374,20 @@ function MobileHeader({
|
|
|
1356
1374
|
}
|
|
1357
1375
|
});
|
|
1358
1376
|
}
|
|
1359
|
-
if (
|
|
1377
|
+
if (header?.isAndroidDelisted && header?.apkURL) {
|
|
1378
|
+
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
1379
|
+
data: {
|
|
1380
|
+
link: header?.apkURL,
|
|
1381
|
+
isLink: 1,
|
|
1382
|
+
value: 'Download App',
|
|
1383
|
+
isExternal: 1
|
|
1384
|
+
},
|
|
1385
|
+
type: 'primary',
|
|
1386
|
+
size: 'small',
|
|
1387
|
+
target: 'blank',
|
|
1388
|
+
rel: null
|
|
1389
|
+
});
|
|
1390
|
+
} else if (iosUrl && androidUrl) {
|
|
1360
1391
|
downloadLink = /*#__PURE__*/React.createElement("div", null, iosUrl, androidUrl);
|
|
1361
1392
|
} else if (header?.iosUrl) {
|
|
1362
1393
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|