l-min-components 1.0.264 → 1.0.266
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>
|
|
@@ -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(";");
|
|
@@ -308,6 +309,9 @@ const HeaderComponent = (props) => {
|
|
|
308
309
|
setInstructorAccountData={setInstructorAccountData}
|
|
309
310
|
enterpriseAccountData={enterpriseAccountData}
|
|
310
311
|
setEnterpriseAccountData={setEnterpriseAccountData}
|
|
312
|
+
setGeneralData={setGeneralData}
|
|
313
|
+
userAccountsDetail={userAccountsDetail}
|
|
314
|
+
userDetails={userDetails}
|
|
311
315
|
/>
|
|
312
316
|
)}
|
|
313
317
|
</Navbar>
|
|
@@ -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}>
|