l-min-components 1.0.673 → 1.0.677
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/package.json
CHANGED
|
@@ -143,7 +143,7 @@ const HeaderComponent = (props) => {
|
|
|
143
143
|
if (
|
|
144
144
|
window.location.host?.includes("developer") ||
|
|
145
145
|
window.location.host?.includes("coming") ||
|
|
146
|
-
window.location.host?.includes("localhost")
|
|
146
|
+
window.location.host?.includes("localhost") || window.location.pathname.includes('developer')
|
|
147
147
|
) {
|
|
148
148
|
setSelectedAccount(
|
|
149
149
|
developerArray?.find(
|
|
@@ -162,16 +162,15 @@ const HeaderComponent = (props) => {
|
|
|
162
162
|
|
|
163
163
|
// update general data when selected acct changes
|
|
164
164
|
|
|
165
|
-
useEffect(()=>{
|
|
166
|
-
if(selectedAccount){
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}));
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
if (selectedAccount) {
|
|
167
|
+
setGeneralData((generalData) => ({
|
|
168
|
+
...generalData,
|
|
169
|
+
selectedAccount: selectedAccount,
|
|
170
|
+
}));
|
|
172
171
|
}
|
|
173
|
-
}, [selectedAccount])
|
|
174
|
-
|
|
172
|
+
}, [selectedAccount]);
|
|
173
|
+
|
|
175
174
|
const containerRef = useRef(null);
|
|
176
175
|
const secondContainerRef = useRef(null);
|
|
177
176
|
|
|
@@ -245,9 +244,8 @@ const HeaderComponent = (props) => {
|
|
|
245
244
|
}
|
|
246
245
|
}, []);
|
|
247
246
|
|
|
248
|
-
|
|
249
247
|
// Determine home page for active style purpose
|
|
250
|
-
const isHomePage = () => window.location.pathname ===
|
|
248
|
+
const isHomePage = () => window.location.pathname === "/";
|
|
251
249
|
|
|
252
250
|
// Determine the label based on the current path
|
|
253
251
|
const getNavLinkLabel = () => {
|
|
@@ -365,7 +363,7 @@ const HeaderComponent = (props) => {
|
|
|
365
363
|
}}
|
|
366
364
|
>
|
|
367
365
|
<li>
|
|
368
|
-
<a className={isHomePage() ?
|
|
366
|
+
<a className={isHomePage() ? "active" : ""}>
|
|
369
367
|
<BookIcon /> {getNavLinkLabel()}
|
|
370
368
|
</a>
|
|
371
369
|
</li>
|
|
@@ -383,9 +381,11 @@ const HeaderComponent = (props) => {
|
|
|
383
381
|
<a
|
|
384
382
|
onClick={() => {
|
|
385
383
|
window.location.href =
|
|
386
|
-
"https://
|
|
384
|
+
"https://559staging.learngual.com/settings/";
|
|
387
385
|
}}
|
|
388
|
-
className={
|
|
386
|
+
className={
|
|
387
|
+
window.location.pathname.includes("settings") ? "active" : ""
|
|
388
|
+
}
|
|
389
389
|
style={{ cursor: "pointer" }}
|
|
390
390
|
>
|
|
391
391
|
<SettingIcon /> Settings
|
|
@@ -82,7 +82,10 @@ const SideMenu = ({
|
|
|
82
82
|
) {
|
|
83
83
|
return (statusText = true);
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
85
|
+
if (
|
|
86
|
+
window.location.pathname.includes("developer/report") &&
|
|
87
|
+
path === "/developer/report"
|
|
88
|
+
) {
|
|
86
89
|
return (statusText = true);
|
|
87
90
|
}
|
|
88
91
|
|
|
@@ -251,7 +254,7 @@ const SideMenu = ({
|
|
|
251
254
|
) {
|
|
252
255
|
newTab
|
|
253
256
|
? window.open(path, "_blank")
|
|
254
|
-
: (window.location.href = `https://
|
|
257
|
+
: (window.location.href = `https://559staging.learngual.com${path}`);
|
|
255
258
|
} else if (window.location.hostname.includes("localhost")) {
|
|
256
259
|
newTab
|
|
257
260
|
? window.open(path, "_blank")
|