diy-template-components 1.0.37 → 1.0.39
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 +4 -5
- package/build/index.es.js.map +1 -1
- package/build/index.js +4 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -1035,7 +1035,7 @@ function getShortenedSubstring(name, length, allowDots = true) {
|
|
|
1035
1035
|
return '';
|
|
1036
1036
|
}
|
|
1037
1037
|
function getDownloadAppLink(androidUrl, iosUrl) {
|
|
1038
|
-
if (typeof window !==
|
|
1038
|
+
if (typeof window !== 'undefined') {
|
|
1039
1039
|
if (/Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(window?.navigator?.userAgent) && androidUrl) {
|
|
1040
1040
|
console.log('sakshat in android');
|
|
1041
1041
|
// Android Browser
|
|
@@ -1080,7 +1080,6 @@ function OptionList({
|
|
|
1080
1080
|
const apkURL = headerData?.apkURL;
|
|
1081
1081
|
const downloadApkURL = isAndroidDelisted && apkURL ? apkURL : null;
|
|
1082
1082
|
const downloadAppText = countryCode === 'KR' ? '앱다운로드' : 'Download App';
|
|
1083
|
-
console.log(headerData, 'sakshat header options list');
|
|
1084
1083
|
const renderDownloadAppButton = () => {
|
|
1085
1084
|
return /*#__PURE__*/React.createElement(React.Fragment, null, apkURL && /*#__PURE__*/React.createElement("a", {
|
|
1086
1085
|
download: true,
|
|
@@ -1147,7 +1146,7 @@ function OptionList({
|
|
|
1147
1146
|
icon: arrowDown
|
|
1148
1147
|
}) : null, isTutorWebsite && /*#__PURE__*/React.createElement(React.Fragment, null, isAndroidDelisted && !headerData.navs ? /*#__PURE__*/React.createElement(React.Fragment, null, renderDownloadAppButton()) : /*#__PURE__*/React.createElement(React.Fragment, null, !headerData?.navs && renderAppDownloadLinks())), isMobile ? downloadApkURL?.length > 0 || headerData?.appLink?.length > 0 || headerData?.iosUrl?.length > 0 ? /*#__PURE__*/React.createElement(Button, {
|
|
1149
1148
|
data: {
|
|
1150
|
-
link:
|
|
1149
|
+
link: headerData?.appLink || headerData?.iosUrl ? getDownloadAppLink(headerData?.appLink, headerData?.iosUrl) : downloadApkURL,
|
|
1151
1150
|
isLink: 1,
|
|
1152
1151
|
value: downloadAppText,
|
|
1153
1152
|
isExternal: 1
|
|
@@ -1471,7 +1470,7 @@ function MobileHeader({
|
|
|
1471
1470
|
if (header?.isAndroidDelisted && header?.apkURL) {
|
|
1472
1471
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
1473
1472
|
data: {
|
|
1474
|
-
link: header?.iosUrl ? getDownloadAppLink(
|
|
1473
|
+
link: header?.iosUrl ? getDownloadAppLink(header?.appLink, header?.iosUrl) : header?.apkURL,
|
|
1475
1474
|
isLink: 1,
|
|
1476
1475
|
value: downloadAppText,
|
|
1477
1476
|
isExternal: 1
|
|
@@ -1484,7 +1483,7 @@ function MobileHeader({
|
|
|
1484
1483
|
} else if (header?.appLink) {
|
|
1485
1484
|
downloadLink = /*#__PURE__*/React.createElement(Button, {
|
|
1486
1485
|
data: {
|
|
1487
|
-
link: getDownloadAppLink(header?.appLink,
|
|
1486
|
+
link: getDownloadAppLink(header?.appLink, header?.iosUrl),
|
|
1488
1487
|
isLink: 1,
|
|
1489
1488
|
value: downloadAppText,
|
|
1490
1489
|
isExternal: 1
|