l-min-components 1.0.185 → 1.0.191
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
|
@@ -29,7 +29,7 @@ const AccountDropdown = (props) => {
|
|
|
29
29
|
if (pathname?.includes("personal")) {
|
|
30
30
|
setSelectedAccount(personalAccountData[0]);
|
|
31
31
|
}
|
|
32
|
-
if (
|
|
32
|
+
if (window.location.host?.includes("developer")) {
|
|
33
33
|
setSelectedAccount(developerAccountData[0]);
|
|
34
34
|
}
|
|
35
35
|
if (pathname?.includes("instructor")) {
|
|
@@ -78,8 +78,16 @@ const AccountDropdown = (props) => {
|
|
|
78
78
|
}
|
|
79
79
|
}, [props?.data?.data]);
|
|
80
80
|
useEffect(() => {
|
|
81
|
-
if (selectedAccount) {
|
|
82
|
-
|
|
81
|
+
if (selectedAccount?.type === "DEVELOPER") {
|
|
82
|
+
date.setDate(date.getDate() + 28);
|
|
83
|
+
document.cookie =
|
|
84
|
+
"activeDeveloperAccount=" +
|
|
85
|
+
selectedAccount?.id +
|
|
86
|
+
`; domain=${
|
|
87
|
+
window.location.href.includes("localhost")
|
|
88
|
+
? ".localhost"
|
|
89
|
+
: ".learngual.com"
|
|
90
|
+
}; path=/; expires=${date.toUTCString()};`;
|
|
83
91
|
}
|
|
84
92
|
}, [selectedAccount]);
|
|
85
93
|
return (
|
|
@@ -146,10 +154,17 @@ const AccountDropdown = (props) => {
|
|
|
146
154
|
className="account-info"
|
|
147
155
|
onClick={() => {
|
|
148
156
|
setSelectedAccount(developerItem);
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
window.location.
|
|
157
|
+
|
|
158
|
+
if (
|
|
159
|
+
window.location.port &&
|
|
160
|
+
window.location.host.includes("developer")
|
|
161
|
+
) {
|
|
162
|
+
window.location.href = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`;
|
|
163
|
+
} else if (
|
|
164
|
+
!window.location.port &&
|
|
165
|
+
window.location.host.includes("developer")
|
|
166
|
+
) {
|
|
167
|
+
window.location.href = `${window.location.protocol}//${window.location.hostname}/`;
|
|
153
168
|
}
|
|
154
169
|
}}
|
|
155
170
|
key={idx}
|
|
@@ -33,7 +33,7 @@ const HeaderComponentTwo = (props) => {
|
|
|
33
33
|
return (
|
|
34
34
|
<Navbar2>
|
|
35
35
|
<img src={logo} alt="Learngual logo" />
|
|
36
|
-
<Nav2>
|
|
36
|
+
{/* <Nav2>
|
|
37
37
|
<li>
|
|
38
38
|
<a href="#" className="active">
|
|
39
39
|
What we do
|
|
@@ -48,14 +48,14 @@ const HeaderComponentTwo = (props) => {
|
|
|
48
48
|
<li>
|
|
49
49
|
<a href="#">Contact</a>
|
|
50
50
|
</li>
|
|
51
|
-
</Nav2>
|
|
51
|
+
</Nav2> */}
|
|
52
52
|
|
|
53
53
|
<NavGroup2>
|
|
54
54
|
<CountryFlagGroup2>
|
|
55
55
|
<ReactFlagsSelect
|
|
56
56
|
selected={selected}
|
|
57
57
|
onSelect={(code) => setSelected(code)}
|
|
58
|
-
showOptionLabel={
|
|
58
|
+
showOptionLabel={true}
|
|
59
59
|
/>
|
|
60
60
|
<ArrowDownIcon />
|
|
61
61
|
</CountryFlagGroup2>
|