l-min-components 1.0.264 → 1.0.268
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
|
@@ -26,6 +26,9 @@ export const CenterLayout = styled.div`
|
|
|
26
26
|
/* max-width: 900px; */
|
|
27
27
|
margin: ${({ isOpen }) =>
|
|
28
28
|
isOpen ? "0px 252px 0 336px" : "0px 252px 0 145px"};
|
|
29
|
+
@media screen and (max-width: 1023px) {
|
|
30
|
+
margin-right: 0;
|
|
31
|
+
}
|
|
29
32
|
overflow-y: scroll;
|
|
30
33
|
transition: all 0.3s;
|
|
31
34
|
scrollbar-width: thin;
|
|
@@ -35,8 +35,15 @@ const AccountDropdown = (props) => {
|
|
|
35
35
|
? ".localhost"
|
|
36
36
|
: ".learngual.com"
|
|
37
37
|
}; path=/; expires=${date.toUTCString()};`;
|
|
38
|
+
props?.setGeneralData((generalData) => ({
|
|
39
|
+
...generalData,
|
|
40
|
+
accounts: props?.userAccountsDetail?.data,
|
|
41
|
+
user: props?.userDetails?.data,
|
|
42
|
+
selectedAccount: props?.selectedAccount,
|
|
43
|
+
}));
|
|
38
44
|
}
|
|
39
45
|
}, [props?.selectedAccount]);
|
|
46
|
+
console.log(props?.selectedAccount, "selected");
|
|
40
47
|
return (
|
|
41
48
|
<>
|
|
42
49
|
<AccountDropdownLayout>
|
|
@@ -50,8 +57,7 @@ const AccountDropdown = (props) => {
|
|
|
50
57
|
<div>
|
|
51
58
|
<h1>
|
|
52
59
|
{" "}
|
|
53
|
-
{props?.selectedAccount?.
|
|
54
|
-
props?.selectedAccount?.metadata?.organization_name ||
|
|
60
|
+
{props?.selectedAccount?.metadata?.organization_name ||
|
|
55
61
|
props?.activeAccountName}
|
|
56
62
|
</h1>
|
|
57
63
|
<h2 style={{ textTransform: "capitalize" }}>
|
|
@@ -125,7 +131,11 @@ const AccountDropdown = (props) => {
|
|
|
125
131
|
/>
|
|
126
132
|
</div>
|
|
127
133
|
<div className="account-details">
|
|
128
|
-
<h1>
|
|
134
|
+
<h1>
|
|
135
|
+
{" "}
|
|
136
|
+
{developerItem?.metadata?.organization_name ||
|
|
137
|
+
props.accountName}
|
|
138
|
+
</h1>
|
|
129
139
|
{/* <span>{props.notificationCount} </span> */}
|
|
130
140
|
</div>
|
|
131
141
|
</div>
|
|
@@ -61,6 +61,7 @@ const HeaderComponent = (props) => {
|
|
|
61
61
|
...generalData,
|
|
62
62
|
accounts: userAccountsDetail?.data,
|
|
63
63
|
user: userDetails?.data,
|
|
64
|
+
selectedAccount,
|
|
64
65
|
}));
|
|
65
66
|
const cookies = document.cookie;
|
|
66
67
|
const cookieArray = cookies.split(";");
|
|
@@ -274,10 +275,7 @@ const HeaderComponent = (props) => {
|
|
|
274
275
|
/>
|
|
275
276
|
</div>
|
|
276
277
|
<div className="user-info-container">
|
|
277
|
-
<h5>
|
|
278
|
-
{selectedAccount?.display_name ||
|
|
279
|
-
selectedAccount?.metadata?.organization_name}
|
|
280
|
-
</h5>
|
|
278
|
+
<h5>{selectedAccount?.metadata?.organization_name}</h5>
|
|
281
279
|
<h6 style={{ textTransform: "capitalize" }}>
|
|
282
280
|
{selectedAccount?.type?.toLowerCase()}
|
|
283
281
|
</h6>
|
|
@@ -308,6 +306,9 @@ const HeaderComponent = (props) => {
|
|
|
308
306
|
setInstructorAccountData={setInstructorAccountData}
|
|
309
307
|
enterpriseAccountData={enterpriseAccountData}
|
|
310
308
|
setEnterpriseAccountData={setEnterpriseAccountData}
|
|
309
|
+
setGeneralData={setGeneralData}
|
|
310
|
+
userAccountsDetail={userAccountsDetail}
|
|
311
|
+
userDetails={userDetails}
|
|
311
312
|
/>
|
|
312
313
|
)}
|
|
313
314
|
</Navbar>
|
|
@@ -299,7 +299,7 @@ export const AccountDropdownLayout = styled.div`
|
|
|
299
299
|
flex-direction: column;
|
|
300
300
|
position: absolute;
|
|
301
301
|
top: 65px;
|
|
302
|
-
right:
|
|
302
|
+
right: 20px;
|
|
303
303
|
z-index: 5;
|
|
304
304
|
`;
|
|
305
305
|
|
|
@@ -393,7 +393,7 @@ export const AccountDropdownBody = styled.div`
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
& .activated {
|
|
396
|
-
background-color: rgba(
|
|
396
|
+
background-color: rgba(0, 194, 194, 0.15);
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
& .account-details {
|
|
@@ -16,7 +16,6 @@ const UserCard = ({ user, isOpen }) => {
|
|
|
16
16
|
const { handleGetUserDetails, userDetails } = useHeader();
|
|
17
17
|
const [organizationName, setOrganizationName] = useState();
|
|
18
18
|
const { generalData } = useContext(OutletContext);
|
|
19
|
-
console.log(generalData, "data");
|
|
20
19
|
useEffect(() => {
|
|
21
20
|
handleGetUserDetails();
|
|
22
21
|
if (generalData?.accounts) {
|
|
@@ -33,13 +32,15 @@ const UserCard = ({ user, isOpen }) => {
|
|
|
33
32
|
break;
|
|
34
33
|
}
|
|
35
34
|
}
|
|
35
|
+
|
|
36
36
|
generalData?.accounts?.results?.map((account, idx) => {
|
|
37
37
|
if (account?.id === activeDeveloperAccount) {
|
|
38
38
|
return setOrganizationName(account?.metadata?.organization_name);
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
}, []);
|
|
42
|
+
}, [generalData]);
|
|
43
|
+
console.log(generalData, "data");
|
|
43
44
|
|
|
44
45
|
return (
|
|
45
46
|
<UserCardContainer isOpen={isOpen}>
|