diy-template-components 1.0.13 → 1.0.15

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
@@ -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: {
@@ -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("div", {
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
@@ -1310,6 +1332,25 @@ function MobileHeader({
1310
1332
  let androidUrl = null;
1311
1333
  let downloadLink = null;
1312
1334
  if (isTutorWebsite) {
1335
+ console.log(header, 'sakshat header mobile');
1336
+ if (header?.isAndroidDelisted && header?.apkURL) {
1337
+ downloadLink = /*#__PURE__*/React.createElement(Button, {
1338
+ data: {
1339
+ link: header?.apkURL,
1340
+ isLink: 1,
1341
+ value: 'Download App',
1342
+ isExternal: 1
1343
+ },
1344
+ type: '',
1345
+ size: 'small',
1346
+ target: 'blank',
1347
+ rel: null,
1348
+ style: {
1349
+ padding: 0,
1350
+ paddingRight: '8px'
1351
+ }
1352
+ });
1353
+ }
1313
1354
  if (header?.iosUrl) {
1314
1355
  iosUrl = /*#__PURE__*/React.createElement(Button, {
1315
1356
  data: {