l-min-components 1.0.197 → 1.0.201

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.201",
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,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>
@@ -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>