l-min-components 1.0.846 → 1.0.852
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
|
@@ -398,11 +398,7 @@ const HeaderComponent = (props) => {
|
|
|
398
398
|
useEffect(() => {
|
|
399
399
|
if (value) {
|
|
400
400
|
setDefaultLang(value?.slug);
|
|
401
|
-
|
|
402
|
-
handleUpdateUserAccount(generalData?.defaultAccount?.id, {
|
|
403
|
-
language: value?.slug,
|
|
404
|
-
});
|
|
405
|
-
}
|
|
401
|
+
|
|
406
402
|
} else if (generalData?.defaultAccount?.language) {
|
|
407
403
|
setDefaultLang(generalData?.defaultAccount?.language);
|
|
408
404
|
}
|
|
@@ -127,6 +127,11 @@ const LanguageDropdown = ({ languageDropdown, setLanguageDropdown }) => {
|
|
|
127
127
|
? setIsLoading(false)
|
|
128
128
|
: setIsLoading(true);
|
|
129
129
|
localStorage.setItem("defaultLang", JSON.stringify(item));
|
|
130
|
+
if (generalData?.defaultAccount?.id) {
|
|
131
|
+
handleUpdateUserAccount(generalData?.defaultAccount?.id, {
|
|
132
|
+
language: value?.slug,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
130
135
|
}}
|
|
131
136
|
>
|
|
132
137
|
<img src={item?.flag} alt="" /> <span>{item?.name}</span>
|
|
@@ -146,6 +151,11 @@ const LanguageDropdown = ({ languageDropdown, setLanguageDropdown }) => {
|
|
|
146
151
|
? setIsLoading(false)
|
|
147
152
|
: setIsLoading(true);
|
|
148
153
|
localStorage.setItem("defaultLang", JSON.stringify(item));
|
|
154
|
+
if (generalData?.defaultAccount?.id) {
|
|
155
|
+
handleUpdateUserAccount(generalData?.defaultAccount?.id, {
|
|
156
|
+
language: value?.slug,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
149
159
|
}}
|
|
150
160
|
>
|
|
151
161
|
<img src={item?.flag} alt="" /> <span>{item?.name}</span>
|
|
@@ -288,10 +288,12 @@ const SideMenu = ({
|
|
|
288
288
|
: (window.location.href = `https://developer.learngual.com${path}`);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
if (
|
|
292
|
-
window.location.
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
if (!newTab) {
|
|
292
|
+
if (window.location.hostname.includes("559staging")) {
|
|
293
|
+
window.location.href = `https://559staging.learngual.com${path}`;
|
|
294
|
+
} else if (window.location.hostname.includes("localhost")) {
|
|
295
|
+
window.location.href = `http://localhost:${window.location.port}${path}`;
|
|
296
|
+
}
|
|
295
297
|
}
|
|
296
298
|
}}
|
|
297
299
|
// to={route.path}
|
|
@@ -308,7 +310,8 @@ const SideMenu = ({
|
|
|
308
310
|
// : ""
|
|
309
311
|
}`
|
|
310
312
|
)}
|
|
311
|
-
minimal={isOpen}
|
|
313
|
+
minimal={isOpen}
|
|
314
|
+
>
|
|
312
315
|
<IconContainer active={active}>
|
|
313
316
|
{active ? iconActive : icon}
|
|
314
317
|
</IconContainer>
|