l-min-components 1.0.283 → 1.0.287

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.283",
3
+ "version": "1.0.287",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -16,12 +16,20 @@ import {
16
16
  import { leftNavMenu, user, sideMenuOptions } from "../../hooks/leftNavMenu";
17
17
  // import SideMenu from "../sideBar/sideMenu";
18
18
 
19
- const AppMainLayout = ({coming}) => {
19
+ const AppMainLayout = () => {
20
20
  const [isOpen, setIsOpen] = useState(true);
21
21
  const location = useLocation();
22
22
  const [rightLayout, setRightLayout] = useState(true);
23
23
  const [rightComponent, setRightComponent] = useState();
24
24
  const [generalData, setGeneralData] = useState({});
25
+ const [coming, setComing] = useState();
26
+ useEffect(() => {
27
+ if (window.location.host.includes("coming")) {
28
+ setComing(true);
29
+ } else {
30
+ setComing(false);
31
+ }
32
+ }, []);
25
33
 
26
34
  return (
27
35
  <OutletContext.Provider
@@ -32,7 +40,7 @@ const AppMainLayout = ({coming}) => {
32
40
  <MainLayout coming={coming}>
33
41
  <LeftLayout>
34
42
  <SideBar routes={leftNavMenu} />
35
- {!window.location.host.includes("coming") && (
43
+ {!coming && (
36
44
  <SideMenu
37
45
  user={user}
38
46
  routes={sideMenuOptions}
@@ -46,7 +54,7 @@ const AppMainLayout = ({coming}) => {
46
54
  <Outlet />
47
55
  </CenterLayout>
48
56
 
49
- {rightLayout && (
57
+ {rightLayout && !coming && (
50
58
  <RightLayout>{rightComponent ?? <Banner />}</RightLayout>
51
59
  )}
52
60
  </MainLayout>
@@ -113,6 +113,7 @@ const HeaderComponent = (props) => {
113
113
  }
114
114
  if (
115
115
  window.location.host?.includes("developer") ||
116
+ window.location.host?.includes("coming") ||
116
117
  window.location.host?.includes("localhost")
117
118
  ) {
118
119
  setSelectedAccount(
@@ -179,11 +180,18 @@ const HeaderComponent = (props) => {
179
180
  }}
180
181
  >
181
182
  <li>
182
- <a href="#" className="active">
183
- <BookIcon /> Learning
183
+ <a className={"active"}>
184
+ <BookIcon />{" "}
185
+ {(window.location.pathname.includes("fun") && "Fun") ||
186
+ (window.location.pathname.includes("community") && "Community") ||
187
+ (window.location.pathname.includes("duet") && "Duet") ||
188
+ (window.location.pathname.includes("speech") && "Speech") ||
189
+ (window.location.pathname.includes("dictionary") &&
190
+ "Dictionary") ||
191
+ "Learning"}
184
192
  </a>
185
193
  </li>
186
- <li>
194
+ {/* <li>
187
195
  <a href="#">
188
196
  <PeopleIcon /> Friends
189
197
  </a>
@@ -192,7 +200,7 @@ const HeaderComponent = (props) => {
192
200
  <a href="#">
193
201
  <MessageIcon /> Messages
194
202
  </a>
195
- </li>
203
+ </li> */}
196
204
  <li>
197
205
  <a
198
206
  onClick={() => {
@@ -204,11 +212,11 @@ const HeaderComponent = (props) => {
204
212
  <SettingIcon /> Settings
205
213
  </a>
206
214
  </li>
207
- <li>
215
+ {/* <li>
208
216
  <a href="#">
209
217
  <NotificationIcon /> Notifications
210
218
  </a>
211
- </li>
219
+ </li> */}
212
220
  </Nav>
213
221
 
214
222
  <NavGroup
File without changes