@mjhls/mjh-framework 1.0.677 → 1.0.678
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/README.md +1 -1
- package/dist/cjs/HamMagazine.js +2 -2
- package/dist/cjs/NavMagazine.js +2 -2
- package/dist/cjs/NavNative.js +13 -6
- package/dist/esm/HamMagazine.js +2 -2
- package/dist/esm/NavMagazine.js +2 -2
- package/dist/esm/NavNative.js +13 -6
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/HamMagazine.js
CHANGED
|
@@ -125,11 +125,11 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
125
125
|
if (resolution === 0) {
|
|
126
126
|
setResolution(window.innerWidth);
|
|
127
127
|
} else {
|
|
128
|
-
if (window.innerWidth < 768 && resolution >= 768) {
|
|
128
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
129
129
|
console.log('Detected Mobile Resolution');
|
|
130
130
|
window.location.reload();
|
|
131
131
|
// Updating the condition to reload the page on resize in desktop view
|
|
132
|
-
} else if (window.innerWidth >= 768) {
|
|
132
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
133
133
|
console.log('Detected Tablet/Desktop Resolution');
|
|
134
134
|
window.location.reload();
|
|
135
135
|
}
|
package/dist/cjs/NavMagazine.js
CHANGED
|
@@ -127,11 +127,11 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
127
127
|
if (resolution === 0) {
|
|
128
128
|
setResolution(window.innerWidth);
|
|
129
129
|
} else {
|
|
130
|
-
if (window.innerWidth < 768 && resolution >= 768) {
|
|
130
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
131
131
|
console.log('Detected Mobile Resolution');
|
|
132
132
|
window.location.reload();
|
|
133
133
|
// Updating the condition to reload the page on resize in desktop view
|
|
134
|
-
} else if (window.innerWidth >= 768) {
|
|
134
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
135
135
|
console.log('Detected Tablet/Desktop Resolution');
|
|
136
136
|
window.location.reload();
|
|
137
137
|
}
|
package/dist/cjs/NavNative.js
CHANGED
|
@@ -77,7 +77,14 @@ var NavNative = function NavNative(props) {
|
|
|
77
77
|
screenWidth = _useState6[0],
|
|
78
78
|
setScreenWidth = _useState6[1];
|
|
79
79
|
|
|
80
|
+
var _useState7 = React.useState(true),
|
|
81
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
82
|
+
isDesktop = _useState8[0],
|
|
83
|
+
setIsDesktop = _useState8[1];
|
|
84
|
+
|
|
80
85
|
React.useEffect(function () {
|
|
86
|
+
// Check for desktop or mobile device
|
|
87
|
+
if (window && window.innerWidth < 1200) setIsDesktop(false);
|
|
81
88
|
// Initial screenwidth on refresh or on load
|
|
82
89
|
setScreenWidth(parseInt(window.innerWidth));
|
|
83
90
|
// Initial User agent setup on refresh or on load
|
|
@@ -96,11 +103,11 @@ var NavNative = function NavNative(props) {
|
|
|
96
103
|
if (resolution === 0) {
|
|
97
104
|
setResolution(window.innerWidth);
|
|
98
105
|
} else {
|
|
99
|
-
if (window.innerWidth < 768 && resolution >= 768) {
|
|
106
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
100
107
|
console.log('Detected Mobile Resolution');
|
|
101
108
|
window.location.reload();
|
|
102
109
|
// Updating the condition to reload the page on resize in desktop view
|
|
103
|
-
} else if (window.innerWidth >= 768) {
|
|
110
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
104
111
|
console.log('Detected Tablet/Desktop Resolution');
|
|
105
112
|
window.location.reload();
|
|
106
113
|
}
|
|
@@ -122,10 +129,10 @@ var NavNative = function NavNative(props) {
|
|
|
122
129
|
|
|
123
130
|
// Search Term
|
|
124
131
|
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
searchKey =
|
|
128
|
-
setSearchKey =
|
|
132
|
+
var _useState9 = React.useState(''),
|
|
133
|
+
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
134
|
+
searchKey = _useState10[0],
|
|
135
|
+
setSearchKey = _useState10[1];
|
|
129
136
|
|
|
130
137
|
// Search function
|
|
131
138
|
|
package/dist/esm/HamMagazine.js
CHANGED
|
@@ -118,11 +118,11 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
118
118
|
if (resolution === 0) {
|
|
119
119
|
setResolution(window.innerWidth);
|
|
120
120
|
} else {
|
|
121
|
-
if (window.innerWidth < 768 && resolution >= 768) {
|
|
121
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
122
122
|
console.log('Detected Mobile Resolution');
|
|
123
123
|
window.location.reload();
|
|
124
124
|
// Updating the condition to reload the page on resize in desktop view
|
|
125
|
-
} else if (window.innerWidth >= 768) {
|
|
125
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
126
126
|
console.log('Detected Tablet/Desktop Resolution');
|
|
127
127
|
window.location.reload();
|
|
128
128
|
}
|
package/dist/esm/NavMagazine.js
CHANGED
|
@@ -120,11 +120,11 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
120
120
|
if (resolution === 0) {
|
|
121
121
|
setResolution(window.innerWidth);
|
|
122
122
|
} else {
|
|
123
|
-
if (window.innerWidth < 768 && resolution >= 768) {
|
|
123
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
124
124
|
console.log('Detected Mobile Resolution');
|
|
125
125
|
window.location.reload();
|
|
126
126
|
// Updating the condition to reload the page on resize in desktop view
|
|
127
|
-
} else if (window.innerWidth >= 768) {
|
|
127
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
128
128
|
console.log('Detected Tablet/Desktop Resolution');
|
|
129
129
|
window.location.reload();
|
|
130
130
|
}
|
package/dist/esm/NavNative.js
CHANGED
|
@@ -70,7 +70,14 @@ var NavNative = function NavNative(props) {
|
|
|
70
70
|
screenWidth = _useState6[0],
|
|
71
71
|
setScreenWidth = _useState6[1];
|
|
72
72
|
|
|
73
|
+
var _useState7 = useState(true),
|
|
74
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
75
|
+
isDesktop = _useState8[0],
|
|
76
|
+
setIsDesktop = _useState8[1];
|
|
77
|
+
|
|
73
78
|
useEffect(function () {
|
|
79
|
+
// Check for desktop or mobile device
|
|
80
|
+
if (window && window.innerWidth < 1200) setIsDesktop(false);
|
|
74
81
|
// Initial screenwidth on refresh or on load
|
|
75
82
|
setScreenWidth(parseInt(window.innerWidth));
|
|
76
83
|
// Initial User agent setup on refresh or on load
|
|
@@ -89,11 +96,11 @@ var NavNative = function NavNative(props) {
|
|
|
89
96
|
if (resolution === 0) {
|
|
90
97
|
setResolution(window.innerWidth);
|
|
91
98
|
} else {
|
|
92
|
-
if (window.innerWidth < 768 && resolution >= 768) {
|
|
99
|
+
if (window.innerWidth < 768 && resolution >= 768 && isDesktop) {
|
|
93
100
|
console.log('Detected Mobile Resolution');
|
|
94
101
|
window.location.reload();
|
|
95
102
|
// Updating the condition to reload the page on resize in desktop view
|
|
96
|
-
} else if (window.innerWidth >= 768) {
|
|
103
|
+
} else if (window.innerWidth >= 768 && !isDesktop) {
|
|
97
104
|
console.log('Detected Tablet/Desktop Resolution');
|
|
98
105
|
window.location.reload();
|
|
99
106
|
}
|
|
@@ -115,10 +122,10 @@ var NavNative = function NavNative(props) {
|
|
|
115
122
|
|
|
116
123
|
// Search Term
|
|
117
124
|
|
|
118
|
-
var
|
|
119
|
-
|
|
120
|
-
searchKey =
|
|
121
|
-
setSearchKey =
|
|
125
|
+
var _useState9 = useState(''),
|
|
126
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
127
|
+
searchKey = _useState10[0],
|
|
128
|
+
setSearchKey = _useState10[1];
|
|
122
129
|
|
|
123
130
|
// Search function
|
|
124
131
|
|