l-min-components 1.0.394 → 1.0.397

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.394",
3
+ "version": "1.0.397",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -22,6 +22,8 @@ import {
22
22
  import { leftNavMenu, user, sideMenuOptions } from "../../hooks/leftNavMenu";
23
23
  import InstructorAccountSwitcher from "../instructorAccountSwitcher";
24
24
  // import SideMenu from "../sideBar/sideMenu";
25
+ import InstructorRightBar from "../fileRightBar/instructorRightBar";
26
+ import EnterpriseRightBar from "../fileRightBar/enterpriseRightBar";
25
27
 
26
28
  const AppMainLayout = () => {
27
29
  const [isOpen, setIsOpen] = useState(true);
@@ -119,6 +121,7 @@ const AppMainLayout = () => {
119
121
  }
120
122
  isOpen={isOpen}
121
123
  setIsOpen={setIsOpen}
124
+ setRightComponent={setRightComponent}
122
125
  />
123
126
  )}
124
127
  </>
@@ -13,6 +13,8 @@ import { IoIosArrowBack, IoIosArrowForward } from "react-icons/io";
13
13
  import { CiLogout } from "react-icons/ci";
14
14
  import UserCard from "../userCard";
15
15
  import cx from "classnames";
16
+ import InstructorRightBar from "../../fileRightBar/instructorRightBar";
17
+ import EnterpriseRightBar from "../../fileRightBar/enterpriseRightBar";
16
18
 
17
19
  const SideMenu = ({
18
20
  user,
@@ -22,6 +24,7 @@ const SideMenu = ({
22
24
  isOpen,
23
25
  setIsOpen,
24
26
  affiliatesActive,
27
+ setRightComponent
25
28
  }) => {
26
29
  // const [isOpen, setIsOpen] = useState(false);
27
30
  const onToggle = () => {
@@ -47,6 +50,10 @@ const SideMenu = ({
47
50
  setRouteFilter(filteredRoutes);
48
51
  }
49
52
  }, [affiliatesActive]);
53
+
54
+ // Right bars
55
+ const EnterpriseRight = <EnterpriseRightBar />
56
+ const InstructorRight = <InstructorRightBar />
50
57
 
51
58
  const renderNavigationItem = (route, index) => {
52
59
  const { icon, iconActive, text, notifications, path, affiliates } = route;
@@ -87,6 +94,7 @@ const SideMenu = ({
87
94
  window.location.pathname.includes("/personal/courses") &&
88
95
  path === "/personal/courses"
89
96
  ) {
97
+ setRightComponent(InstructorRight)
90
98
  return (statusText = true);
91
99
  }
92
100
  if (
@@ -114,18 +122,21 @@ const SideMenu = ({
114
122
  window.location.pathname.includes("/enterprise/dashboard") &&
115
123
  path === "/enterprise/dashboard"
116
124
  ) {
125
+ setRightComponent(EnterpriseRight)
117
126
  return (statusText = true);
118
127
  }
119
128
  if (
120
129
  window.location.pathname.includes("/enterprise/courses") &&
121
130
  path === "/enterprise/courses"
122
131
  ) {
132
+ setRightComponent(EnterpriseRight)
123
133
  return (statusText = true);
124
134
  }
125
135
  if (
126
136
  window.location.pathname.includes("/enterprise/reports") &&
127
137
  path === "/enterprise/reports"
128
138
  ) {
139
+ setRightComponent(EnterpriseRight)
129
140
  return (statusText = true);
130
141
  }
131
142
  if (
@@ -144,6 +155,7 @@ const SideMenu = ({
144
155
  window.location.pathname.includes("/enterprise/announcements") &&
145
156
  path === "/enterprise/announcements"
146
157
  ) {
158
+ setRightComponent(EnterpriseRight)
147
159
  return (statusText = true);
148
160
  }
149
161
  if (
@@ -159,30 +171,35 @@ const SideMenu = ({
159
171
  window.location.pathname.includes("/instructor/dashboard") &&
160
172
  path === "/instructor/dashboard"
161
173
  ) {
174
+ setRightComponent(InstructorRight)
162
175
  return (statusText = true);
163
176
  }
164
177
  if (
165
178
  window.location.pathname.includes("/instructor/courses") &&
166
179
  path === "/instructor/courses"
167
180
  ) {
181
+ setRightComponent(InstructorRight)
168
182
  return (statusText = true);
169
183
  }
170
184
  if (
171
185
  window.location.pathname.includes("/instructor/reports") &&
172
186
  path === "/instructor/reports"
173
187
  ) {
188
+ setRightComponent(InstructorRight)
174
189
  return (statusText = true);
175
190
  }
176
191
  if (
177
192
  window.location.pathname.includes("/instructor/manage-teams") &&
178
193
  path === "/instructor/manage-teams"
179
194
  ) {
195
+ setRightComponent(InstructorRight)
180
196
  return (statusText = true);
181
197
  }
182
198
  if (
183
199
  window.location.pathname.includes("/instructor/manage-students") &&
184
200
  path === "/instructor/manage-students"
185
201
  ) {
202
+ setRightComponent(InstructorRight)
186
203
  return (statusText = true);
187
204
  }
188
205
  if (
@@ -195,12 +212,14 @@ const SideMenu = ({
195
212
  window.location.pathname.includes("/instructor/contracts") &&
196
213
  path === "/instructor/contracts"
197
214
  ) {
215
+ setRightComponent(InstructorRight)
198
216
  return (statusText = true);
199
217
  }
200
218
  if (
201
219
  window.location.pathname.includes("/instructor/announcements") &&
202
220
  path === "/instructor/announcements"
203
221
  ) {
222
+ setRightComponent(InstructorRight)
204
223
  return (statusText = true);
205
224
  }
206
225
  if (