l-min-components 1.0.197 → 1.0.203

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "l-min-components",
3
- "version": "1.0.197",
3
+ "version": "1.0.203",
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
+ "l-min-components": "^1.0.197",
20
21
  "moment": "^2.29.4",
21
22
  "prop-types": "^15.8.1",
22
23
  "rc-slider": "^10.1.1",
@@ -25,12 +25,16 @@ export const CenterLayout = styled.div`
25
25
  width: 100%;
26
26
  /* max-width: 900px; */
27
27
  margin: 0 20px;
28
+ overflow-y: scroll;
28
29
  `;
29
30
 
30
31
  export const RightLayout = styled.div`
31
32
  width: 100%;
32
33
  max-width: 232px;
33
-
34
+ position: fixed;
35
+ max-height: 609px;
36
+ height: 609px;
37
+ right: 20px;
34
38
  > div {
35
39
  width: 100%;
36
40
  }
@@ -25,22 +25,21 @@ const AccountDropdown = (props) => {
25
25
  const [selectedAccount, setSelectedAccount] = useState();
26
26
  const navigate = useNavigate();
27
27
  const { pathname } = useLocation();
28
- useEffect(() => {
29
- if (pathname?.includes("personal")) {
30
- setSelectedAccount(personalAccountData[0]);
31
- }
32
- if (window.location.host?.includes("developer")) {
33
- setSelectedAccount(developerAccountData[0]);
34
- }
35
- if (pathname?.includes("instructor")) {
36
- setSelectedAccount(instructorAccountData[0]);
37
- }
38
- if (pathname?.includes("enterprise")) {
39
- setSelectedAccount(enterpriseAccountData[0]);
40
- }
41
- }, [pathname]);
28
+ useEffect(() => {}, [pathname]);
42
29
  useEffect(() => {
43
30
  if (props?.data?.data) {
31
+ if (pathname?.includes("personal")) {
32
+ setSelectedAccount(personalAccountData[0]);
33
+ }
34
+ if (window.location.host?.includes("developer")) {
35
+ setSelectedAccount(developerAccountData[0]);
36
+ }
37
+ if (pathname?.includes("instructor")) {
38
+ setSelectedAccount(instructorAccountData[0]);
39
+ }
40
+ if (pathname?.includes("enterprise")) {
41
+ setSelectedAccount(enterpriseAccountData[0]);
42
+ }
44
43
  let personalArray = [];
45
44
  let developerArray = [];
46
45
  let instructorArray = [];
@@ -51,12 +51,12 @@ const HeaderComponent = (props) => {
51
51
  <Navbar>
52
52
  <img src={logo} alt="Learngual logo" />
53
53
  <Nav>
54
- {/* <li>
54
+ <li>
55
55
  <a href="#" className="active">
56
56
  <BookIcon /> Learning
57
57
  </a>
58
58
  </li>
59
- <li>
59
+ {/* <li>
60
60
  <a href="#">
61
61
  <PeopleIcon /> Friends
62
62
  </a>
@@ -43,7 +43,8 @@ const SideMenu = ({
43
43
  className={cx(`${route.text}`, ({ isActive, isPending }) => {
44
44
  isActive ? "active" : "";
45
45
  })}
46
- minimal={isOpen}>
46
+ minimal={isOpen}
47
+ >
47
48
  <IconContainer active={active}>{icon}</IconContainer>
48
49
 
49
50
  <TextContainer minimal={isOpen}>{text}</TextContainer>
@@ -2,12 +2,13 @@ import styled from "styled-components";
2
2
  import { NavLink } from "react-router-dom";
3
3
 
4
4
  export const SideMenuContainer = styled.div`
5
- position: relative;
5
+ position: fixed;
6
6
 
7
7
  width: ${({ isOpen }) => (isOpen ? "239px" : "48px")};
8
- height: 80vh;
8
+ height: 609px;
9
+ max-height: 609px;
9
10
  display: flex;
10
- flex-direction: column;
11
+ flex-direction: column;
11
12
 
12
13
  background-color: #00c2c2;
13
14
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
@@ -43,6 +44,7 @@ export const NavigationItemContainer = styled(NavLink)`
43
44
  display: flex;
44
45
  align-items: center;
45
46
  gap: 10px;
47
+
46
48
  cursor: pointer;
47
49
  position: relative;
48
50
  padding: ${({ minimal }) => (minimal ? "12px 16px" : "12px 12px")};
@@ -16,7 +16,11 @@ const SideBar = ({ routes }) => {
16
16
  <NavItems>
17
17
  {routes.map((route) => (
18
18
  <NavItem key={route.path}>
19
- <NavLinkStyled to={route.path} activeClassName="active">
19
+ <NavLinkStyled
20
+ to={route.path}
21
+ activeClassName="active"
22
+ className={route?.label === "Learning" ? "active" : ""}
23
+ >
20
24
  <Icon>{route.icon}</Icon>
21
25
  <span className="text">{route.label}</span>
22
26
  </NavLinkStyled>