l-min-components 1.0.557 → 1.0.558

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.557",
3
+ "version": "1.0.558",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from "react";
1
+ import React, { useState, useEffect, useContext } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import {
4
4
  SideMenuContainer,
@@ -15,6 +15,7 @@ import UserCard from "../userCard";
15
15
  import cx from "classnames";
16
16
  import InstructorRightBar from "../../fileRightBar/instructorRightBar";
17
17
  import EnterpriseRightBar from "../../fileRightBar/enterpriseRightBar";
18
+ import { OutletContext } from "../../AppMainLayout";
18
19
 
19
20
  const SideMenu = ({
20
21
  user,
@@ -28,10 +29,16 @@ const SideMenu = ({
28
29
  }) => {
29
30
  console.log('user type', userType);
30
31
  // const [isOpen, setIsOpen] = useState(false);
32
+
33
+ const {setGeneralData, generalData} = useContext(OutletContext)
31
34
  const onToggle = () => {
32
35
  setIsOpen(!isOpen);
33
36
  };
34
37
 
38
+ useEffect(()=>{
39
+ setGeneralData({...generalData, isOpen})
40
+ }, [isOpen])
41
+
35
42
  // Normal route filter
36
43
  const filteredRoutes = routes.find(
37
44
  (route) => route.userType === userType