l-min-components 1.0.270 → 1.0.273
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 +2 -1
- package/src/components/header/account-dropdown.jsx +3 -3
- package/src/components/header/index.jsx +3 -1
- package/src/components/header/index.styled.js +3 -3
- package/src/components/sideBar/userCard/index.jsx +3 -3
- package/src/components/sideNav/index.jsx +29 -5
- package/src/hooks/leftNavMenu.jsx +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "l-min-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.273",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/assets",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"axios-hooks": "^4.0.0",
|
|
18
18
|
"chart.js": "^4.2.1",
|
|
19
19
|
"classnames": "^2.3.2",
|
|
20
|
+
"js-cookie": "^3.0.5",
|
|
20
21
|
"l-min-components": "^1.0.220",
|
|
21
22
|
"moment": "^2.29.4",
|
|
22
23
|
"prop-types": "^15.8.1",
|
|
@@ -55,7 +55,7 @@ const AccountDropdown = (props) => {
|
|
|
55
55
|
/>
|
|
56
56
|
</div>
|
|
57
57
|
<div>
|
|
58
|
-
<h1>
|
|
58
|
+
<h1 style={{ textTransform: "capitalize" }}>
|
|
59
59
|
{" "}
|
|
60
60
|
{props?.selectedAccount?.metadata?.organization_name ||
|
|
61
61
|
props?.activeAccountName}
|
|
@@ -101,7 +101,7 @@ const AccountDropdown = (props) => {
|
|
|
101
101
|
)} */}
|
|
102
102
|
{props?.developerAccountData.length > 0 && (
|
|
103
103
|
<div>
|
|
104
|
-
<h3 style={{ marginBottom: 10 }}>Developer
|
|
104
|
+
<h3 style={{ marginBottom: 10 }}>Developer accounts</h3>
|
|
105
105
|
{props?.developerAccountData?.map((developerItem, idx) => (
|
|
106
106
|
<div
|
|
107
107
|
className={`account-info ${
|
|
@@ -131,7 +131,7 @@ const AccountDropdown = (props) => {
|
|
|
131
131
|
/>
|
|
132
132
|
</div>
|
|
133
133
|
<div className="account-details">
|
|
134
|
-
<h1>
|
|
134
|
+
<h1 style={{ textTransform: "capitalize" }}>
|
|
135
135
|
{" "}
|
|
136
136
|
{developerItem?.metadata?.organization_name ||
|
|
137
137
|
props.accountName}
|
|
@@ -275,7 +275,9 @@ const HeaderComponent = (props) => {
|
|
|
275
275
|
/>
|
|
276
276
|
</div>
|
|
277
277
|
<div className="user-info-container">
|
|
278
|
-
<h5
|
|
278
|
+
<h5 style={{ textTransform: "capitalize" }}>
|
|
279
|
+
{selectedAccount?.metadata?.organization_name}
|
|
280
|
+
</h5>
|
|
279
281
|
<h6 style={{ textTransform: "capitalize" }}>
|
|
280
282
|
{selectedAccount?.type?.toLowerCase()}
|
|
281
283
|
</h6>
|
|
@@ -3,7 +3,7 @@ import styled from "styled-components";
|
|
|
3
3
|
/* styles for header component authenticated users */
|
|
4
4
|
export const Navbar = styled.nav`
|
|
5
5
|
background-color: rgba(255, 255, 255, 1);
|
|
6
|
-
padding: 10px
|
|
6
|
+
padding: 10px 30px 10px 20px;
|
|
7
7
|
display: flex;
|
|
8
8
|
font-family: "Nunito";
|
|
9
9
|
width: 100%;
|
|
@@ -43,7 +43,7 @@ export const NavGroup = styled.div`
|
|
|
43
43
|
}
|
|
44
44
|
.dropdown_list {
|
|
45
45
|
position: absolute;
|
|
46
|
-
top:
|
|
46
|
+
top: 65px;
|
|
47
47
|
width: fit-content;
|
|
48
48
|
background: white;
|
|
49
49
|
padding: 15px 0;
|
|
@@ -542,7 +542,7 @@ export const NavGroup2 = styled.div`
|
|
|
542
542
|
}
|
|
543
543
|
.dropdown_list {
|
|
544
544
|
position: absolute;
|
|
545
|
-
top:
|
|
545
|
+
top: 65px;
|
|
546
546
|
width: fit-content;
|
|
547
547
|
background: white;
|
|
548
548
|
padding: 15px 0;
|
|
@@ -35,7 +35,7 @@ const UserCard = ({ user, isOpen }) => {
|
|
|
35
35
|
|
|
36
36
|
generalData?.accounts?.results?.map((account, idx) => {
|
|
37
37
|
if (account?.id === activeDeveloperAccount) {
|
|
38
|
-
return setOrganizationName(account
|
|
38
|
+
return setOrganizationName(account);
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -49,7 +49,7 @@ const UserCard = ({ user, isOpen }) => {
|
|
|
49
49
|
) : (
|
|
50
50
|
<>
|
|
51
51
|
<Avatar
|
|
52
|
-
src={
|
|
52
|
+
src={organizationName?.profile_photo?.url || avatar}
|
|
53
53
|
isOpen={isOpen}
|
|
54
54
|
/>
|
|
55
55
|
<UserDetail isOpen={isOpen}>
|
|
@@ -60,7 +60,7 @@ const UserCard = ({ user, isOpen }) => {
|
|
|
60
60
|
fontWeight: 700,
|
|
61
61
|
fontSize: 15,
|
|
62
62
|
}}
|
|
63
|
-
>{`${organizationName}.`}</Handle>
|
|
63
|
+
>{`${organizationName?.metadata?.organization_name}.`}</Handle>
|
|
64
64
|
</UserDetail>
|
|
65
65
|
</>
|
|
66
66
|
)}
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
} from "./styles";
|
|
10
10
|
import { CiLogout } from "react-icons/ci";
|
|
11
11
|
import { HiOutlineLogout } from "react-icons/hi";
|
|
12
|
-
import LogoutIcon from "./svg/logout"
|
|
12
|
+
import LogoutIcon from "./svg/logout";
|
|
13
|
+
import deleteCookies from "../../utils/deleteCookies";
|
|
13
14
|
|
|
14
15
|
const SideBar = ({ routes }) => {
|
|
15
16
|
return (
|
|
@@ -18,9 +19,16 @@ const SideBar = ({ routes }) => {
|
|
|
18
19
|
{routes.map((route) => (
|
|
19
20
|
<NavItem key={route.path}>
|
|
20
21
|
<NavLinkStyled
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
onClick={() => (window.location.href = route.path)}
|
|
23
|
+
className={
|
|
24
|
+
route?.label !== "Learning"
|
|
25
|
+
? window.location.pathname.includes(
|
|
26
|
+
route?.label.toLowerCase()
|
|
27
|
+
)
|
|
28
|
+
? "active"
|
|
29
|
+
: ""
|
|
30
|
+
: !window.location.host?.includes("comingsoon") && "active"
|
|
31
|
+
}
|
|
24
32
|
>
|
|
25
33
|
<Icon>{route.icon}</Icon>
|
|
26
34
|
<span className="text">{route.label}</span>
|
|
@@ -28,7 +36,23 @@ const SideBar = ({ routes }) => {
|
|
|
28
36
|
</NavItem>
|
|
29
37
|
))}
|
|
30
38
|
</NavItems>
|
|
31
|
-
<IconContainer
|
|
39
|
+
<IconContainer
|
|
40
|
+
onClick={() => {
|
|
41
|
+
deleteCookies("access");
|
|
42
|
+
deleteCookies("refresh");
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
if (
|
|
45
|
+
window.location.hostname.includes("localhost") ||
|
|
46
|
+
window.location.hostname.includes("staging")
|
|
47
|
+
) {
|
|
48
|
+
window.location.href =
|
|
49
|
+
"demo-test-01.learngual.com/login/developer";
|
|
50
|
+
} else {
|
|
51
|
+
window.location.href = "demo.learngual.com/login/developer";
|
|
52
|
+
}
|
|
53
|
+
}, 500);
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
32
56
|
<LogoutIcon className="logout" />
|
|
33
57
|
<p>Sign Out</p>
|
|
34
58
|
</IconContainer>
|
|
@@ -40,32 +40,32 @@ export const user = {
|
|
|
40
40
|
|
|
41
41
|
export const leftNavMenu = [
|
|
42
42
|
{
|
|
43
|
-
path: "/
|
|
43
|
+
path: "https://developer-staging-01.learngual.com/",
|
|
44
44
|
label: "Learning",
|
|
45
45
|
icon: <Learning />,
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
path: "/community",
|
|
48
|
+
path: "https://comingsoon.learngual.com/community",
|
|
49
49
|
label: "Community",
|
|
50
50
|
icon: <CommunityIcon />,
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
path: "/fun",
|
|
53
|
+
path: "https://comingsoon.learngual.com/fun",
|
|
54
54
|
label: "Fun",
|
|
55
55
|
icon: <FunIcon />,
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
path: "/duet",
|
|
58
|
+
path: "https://comingsoon.learngual.com/duet",
|
|
59
59
|
label: "Duet",
|
|
60
60
|
icon: <DuetIcon />,
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
path: "/speech",
|
|
63
|
+
path: "https://comingsoon.learngual.com/speech",
|
|
64
64
|
label: "Speech",
|
|
65
65
|
icon: <SpeechIcon />,
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
path: "/dictionary",
|
|
68
|
+
path: "https://comingsoon.learngual.com/dictionary",
|
|
69
69
|
label: "Dictionary",
|
|
70
70
|
icon: <DictionaryIcon />,
|
|
71
71
|
},
|