l-min-components 1.0.714 → 1.0.719
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 +1 -1
- package/src/components/AppMainLayout/index.jsx +14 -0
- package/src/components/mobileLayout/assets/images/apple_store.png +0 -0
- package/src/components/mobileLayout/assets/images/bg_img.png +0 -0
- package/src/components/mobileLayout/assets/images/play_store.png +0 -0
- package/src/components/mobileLayout/assets/svg/backArrow.jsx +28 -0
- package/src/components/mobileLayout/index.jsx +43 -0
- package/src/components/mobileLayout/index.styled.js +80 -0
- package/src/components/sideBar/sideMenu/index.jsx +18 -9
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@ import EnterpriseRightBar from "../fileRightBar/enterpriseRightBar";
|
|
|
27
27
|
import PersonalRightBar from "../fileRightBar/personalRightBar";
|
|
28
28
|
import useHeader from "../header/getHeaderDetails";
|
|
29
29
|
import GracePeriod from "../deactivated";
|
|
30
|
+
import MobileLayout from "../mobileLayout";
|
|
30
31
|
|
|
31
32
|
const AppMainLayout = () => {
|
|
32
33
|
const [isOpen, setIsOpen] = useState(true);
|
|
@@ -51,6 +52,14 @@ const AppMainLayout = () => {
|
|
|
51
52
|
const [newNotifications, setNewNotifications] = useState([]);
|
|
52
53
|
const [deactivated, setDeactivated] = useState(true); // testing, until we get account setup
|
|
53
54
|
const [gracePeriod, setGracePeriod] = useState(true); // test
|
|
55
|
+
const [deviceWidth, setDeviceWidth] = useState(window.innerWidth);
|
|
56
|
+
|
|
57
|
+
// for mobile view
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
const handleResize = () => setDeviceWidth(window.innerWidth);
|
|
60
|
+
window.addEventListener("resize", handleResize);
|
|
61
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
62
|
+
}, []);
|
|
54
63
|
|
|
55
64
|
const {
|
|
56
65
|
setDefaultAccount,
|
|
@@ -175,6 +184,10 @@ const AppMainLayout = () => {
|
|
|
175
184
|
handleGetNotificationMarkRead,
|
|
176
185
|
}}
|
|
177
186
|
>
|
|
187
|
+
{/* display mobile layout on device width*/}
|
|
188
|
+
{deviceWidth < 1024 ? (
|
|
189
|
+
<MobileLayout />
|
|
190
|
+
) : (
|
|
178
191
|
<Layout
|
|
179
192
|
coming={coming}
|
|
180
193
|
hasLayoutBackgroundImage={hasLayoutBackgroundImage}
|
|
@@ -272,6 +285,7 @@ const AppMainLayout = () => {
|
|
|
272
285
|
)}
|
|
273
286
|
</MainLayout>
|
|
274
287
|
</Layout>
|
|
288
|
+
)}
|
|
275
289
|
</OutletContext.Provider>
|
|
276
290
|
);
|
|
277
291
|
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const BackArrow = ({ width, height, fill }) => (
|
|
3
|
+
<svg
|
|
4
|
+
width="24"
|
|
5
|
+
height="24"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="none"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
>
|
|
10
|
+
<path
|
|
11
|
+
d="M9.57 5.92969L3.5 11.9997L9.57 18.0697"
|
|
12
|
+
stroke="#313333"
|
|
13
|
+
stroke-width="1.5"
|
|
14
|
+
stroke-miterlimit="10"
|
|
15
|
+
stroke-linecap="round"
|
|
16
|
+
stroke-linejoin="round"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M20.5019 12H3.67188"
|
|
20
|
+
stroke="#313333"
|
|
21
|
+
stroke-width="1.5"
|
|
22
|
+
stroke-miterlimit="10"
|
|
23
|
+
stroke-linecap="round"
|
|
24
|
+
stroke-linejoin="round"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
);
|
|
28
|
+
export default BackArrow;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
2
|
+
import { MobileLayoutContainer } from "./index.styled";
|
|
3
|
+
import BackArrow from "./assets/svg/backArrow";
|
|
4
|
+
import img from "./assets/images/bg_img.png";
|
|
5
|
+
import play from "./assets/images/play_store.png";
|
|
6
|
+
import apple from "./assets/images/apple_store.png";
|
|
7
|
+
|
|
8
|
+
const MobileLayout = () => {
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<MobileLayoutContainer>
|
|
12
|
+
<div className="mlc_header">
|
|
13
|
+
<span>
|
|
14
|
+
<BackArrow /> Back
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
<div className="mlc_img">
|
|
18
|
+
<img src={img} alt="bg" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div className="mlc_note_container">
|
|
22
|
+
<p className="mlc_note_title">
|
|
23
|
+
Sorry, you can’t access <br /> your account on a mobile browser.
|
|
24
|
+
</p>
|
|
25
|
+
<p className="mlc_note_subtitle">
|
|
26
|
+
We know it's inconvenient. For better user accessibility, login with a
|
|
27
|
+
desktop device or via our mobile app.
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
<div className="mlc_link_section">
|
|
31
|
+
<a href="#">
|
|
32
|
+
<img src={play} alt="play store" />
|
|
33
|
+
</a>
|
|
34
|
+
<a href="#">
|
|
35
|
+
<img src={apple} alt="apple store" />
|
|
36
|
+
</a>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</MobileLayoutContainer>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default MobileLayout;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const MobileLayoutContainer = styled.div`
|
|
4
|
+
padding: 20px;
|
|
5
|
+
background: #fff;
|
|
6
|
+
height: 100vh;
|
|
7
|
+
.mlc_header {
|
|
8
|
+
display: flex;
|
|
9
|
+
margin-bottom: 16px;
|
|
10
|
+
span {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 10px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
color: #313333;
|
|
16
|
+
font-family: "Nunito";
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: normal;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mlc_img {
|
|
24
|
+
max-width: 208px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
margin: 0 auto 30px;
|
|
28
|
+
img {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mlc_note_container {
|
|
34
|
+
max-width: 350px;
|
|
35
|
+
width: 100%;
|
|
36
|
+
padding: 30px 18px;
|
|
37
|
+
border-radius: 15px;
|
|
38
|
+
background: #f5f7f7;
|
|
39
|
+
margin: 0 auto;
|
|
40
|
+
|
|
41
|
+
.mlc_note_title {
|
|
42
|
+
margin-bottom: 16px;
|
|
43
|
+
color: #313333;
|
|
44
|
+
text-align: center;
|
|
45
|
+
font-family: "Nunito";
|
|
46
|
+
font-size: 25px;
|
|
47
|
+
font-weight: 500;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mlc_note_subtitle {
|
|
51
|
+
margin-bottom: 0;
|
|
52
|
+
color: #636666;
|
|
53
|
+
text-align: center;
|
|
54
|
+
font-family: "Nunito";
|
|
55
|
+
font-size: 18px;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mlc_link_section {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
margin: 30px 0 auto;
|
|
64
|
+
align-items: center;
|
|
65
|
+
|
|
66
|
+
a {
|
|
67
|
+
max-width: 291px;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 50px;
|
|
70
|
+
|
|
71
|
+
&:last-child {
|
|
72
|
+
margin-top: 12px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
img {
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
@@ -26,11 +26,11 @@ const SideMenu = ({
|
|
|
26
26
|
setIsOpen,
|
|
27
27
|
affiliatesActive,
|
|
28
28
|
setRightComponent,
|
|
29
|
-
planState
|
|
29
|
+
planState,
|
|
30
30
|
}) => {
|
|
31
31
|
console.log("user type", userType);
|
|
32
32
|
// const [isOpen, setIsOpen] = useState(false);
|
|
33
|
-
|
|
33
|
+
const [gracePeriod, setGracePeriod] = useState(true);
|
|
34
34
|
|
|
35
35
|
const { setGeneralData, generalData } = useContext(OutletContext);
|
|
36
36
|
const onToggle = () => {
|
|
@@ -52,10 +52,6 @@ const SideMenu = ({
|
|
|
52
52
|
}
|
|
53
53
|
}, [userType]);
|
|
54
54
|
|
|
55
|
-
console.log("====================================");
|
|
56
|
-
console.log(filteredRoutes, "rar");
|
|
57
|
-
console.log("====================================");
|
|
58
|
-
|
|
59
55
|
const [routeFilter, setRouteFilter] = useState();
|
|
60
56
|
useEffect(() => {
|
|
61
57
|
setRouteFilter(filteredRoutes);
|
|
@@ -260,7 +256,6 @@ const SideMenu = ({
|
|
|
260
256
|
};
|
|
261
257
|
const active = handlePathCheck();
|
|
262
258
|
|
|
263
|
-
|
|
264
259
|
return (
|
|
265
260
|
<NavigationItemContainer
|
|
266
261
|
onClick={() => {
|
|
@@ -292,7 +287,18 @@ const SideMenu = ({
|
|
|
292
287
|
}}
|
|
293
288
|
// to={route.path}
|
|
294
289
|
key={index}
|
|
295
|
-
className={cx(
|
|
290
|
+
className={cx(
|
|
291
|
+
`${route.text} ${
|
|
292
|
+
active && "active"
|
|
293
|
+
// active && planState !== "GRACE PERIOD"
|
|
294
|
+
// ? "active"
|
|
295
|
+
// : active && planState === "GRACE PERIOD"
|
|
296
|
+
// ? "grace_period_active"
|
|
297
|
+
// : !active && planState === "GRACE PERIOD"
|
|
298
|
+
// ? "grace_period"
|
|
299
|
+
// : ""
|
|
300
|
+
}`
|
|
301
|
+
)}
|
|
296
302
|
minimal={isOpen}
|
|
297
303
|
>
|
|
298
304
|
<IconContainer active={active}>
|
|
@@ -311,7 +317,10 @@ const SideMenu = ({
|
|
|
311
317
|
};
|
|
312
318
|
|
|
313
319
|
return (
|
|
314
|
-
<SideMenuContainer
|
|
320
|
+
<SideMenuContainer
|
|
321
|
+
isOpen={isOpen}
|
|
322
|
+
// className={planState === "GRACE PERIOD" ? "grace_period disabled" : ""}
|
|
323
|
+
>
|
|
315
324
|
<UserCard user={user} isOpen={isOpen} />
|
|
316
325
|
|
|
317
326
|
<NavigationContainer>
|