l-min-components 1.7.1319 → 1.7.1320
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 +49 -43
- package/src/components/fileRightBar/enterpriseRightBar/api.jsx +5 -3
- package/src/components/fileRightBar/enterpriseRightBar/index.jsx +5 -6
- package/src/components/fileRightBar/instructorRightBar2/affiliateRightBar.jsx +4 -0
- package/src/components/fileRightBar/instructorRightBar2/api.jsx +36 -4
- package/src/components/fileRightBar/instructorRightBar2/index.jsx +4 -0
- package/src/components/fileRightBar/instructorRightBar2/messageSection.jsx +17 -2
- package/src/components/fileRightBar/instructorRightBar2/personalRightBar.jsx +342 -0
- package/src/components/fileRightBar/instructorRightBar2/testModal.jsx +139 -0
- package/src/components/modalWrapper/index.jsx +15 -0
- package/src/components/modalWrapper/style.jsx +41 -0
- package/src/utils/redirectURL.js +8 -0
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import React, {
|
|
|
4
4
|
createContext,
|
|
5
5
|
useMemo,
|
|
6
6
|
useCallback,
|
|
7
|
+
forwardRef,
|
|
7
8
|
} from "react";
|
|
8
9
|
import { Outlet, useLocation } from "react-router-dom";
|
|
9
10
|
import {
|
|
@@ -26,13 +27,14 @@ import InstructorAccountSwitcher from "../instructorAccountSwitcher";
|
|
|
26
27
|
// import SideMenu from "../sideBar/sideMenu";
|
|
27
28
|
import InstructorRightBar from "../fileRightBar/instructorRightBar2";
|
|
28
29
|
import EnterpriseRightBar from "../fileRightBar/enterpriseRightBar";
|
|
29
|
-
import PersonalRightBar from "../fileRightBar/personalRightBar";
|
|
30
30
|
import useHeader from "../header/getHeaderDetails";
|
|
31
31
|
import GracePeriod from "../deactivated";
|
|
32
32
|
import MobileLayout from "../mobileLayout";
|
|
33
33
|
import useTranslation from "../../hooks/useTranslation";
|
|
34
34
|
import useMessageKit from "../../hooks/messaging-kit";
|
|
35
35
|
import AffiliateRightBar from "../fileRightBar/instructorRightBar2/affiliateRightBar";
|
|
36
|
+
import PersonalRightBar from "../fileRightBar/instructorRightBar2/personalRightBar";
|
|
37
|
+
import TestModal from "../fileRightBar/instructorRightBar2/testModal";
|
|
36
38
|
|
|
37
39
|
const AppMainLayout = ({ children }) => {
|
|
38
40
|
const [isOpen, setIsOpen] = useState(true);
|
|
@@ -56,6 +58,7 @@ const AppMainLayout = ({ children }) => {
|
|
|
56
58
|
const [affiliateAccount, setAffiliateAccount] = useState(null);
|
|
57
59
|
const [gracePeriod, setGracePeriod] = useState(true); // test
|
|
58
60
|
const [deviceWidth, setDeviceWidth] = useState(window.innerWidth);
|
|
61
|
+
const [showTest, setShowTest] = useState(null);
|
|
59
62
|
const [newLoadingForPostDefaultAccount, setNewLoadingForPostDefaultAccount] =
|
|
60
63
|
useState(true);
|
|
61
64
|
const [selectedAccount, setSelectedAccount] = useState();
|
|
@@ -300,6 +303,34 @@ const AppMainLayout = ({ children }) => {
|
|
|
300
303
|
|
|
301
304
|
const messageKit = useMessageKit(); // useMessageKit
|
|
302
305
|
|
|
306
|
+
const SetupRightBar = ({
|
|
307
|
+
accountType,
|
|
308
|
+
planState,
|
|
309
|
+
affiliateAccount,
|
|
310
|
+
findText,
|
|
311
|
+
}) => {
|
|
312
|
+
switch (accountType) {
|
|
313
|
+
case "enterprise":
|
|
314
|
+
return <EnterpriseRightBar planState={planState} />;
|
|
315
|
+
|
|
316
|
+
case "instructor":
|
|
317
|
+
return affiliateAccount?.id ? (
|
|
318
|
+
<AffiliateRightBar
|
|
319
|
+
planState={planState}
|
|
320
|
+
affiliateAccount={affiliateAccount.id}
|
|
321
|
+
/>
|
|
322
|
+
) : (
|
|
323
|
+
<InstructorRightBar planState={planState} />
|
|
324
|
+
);
|
|
325
|
+
|
|
326
|
+
case "developer":
|
|
327
|
+
return <DeveloperBanner findText={findText} />;
|
|
328
|
+
case "personal":
|
|
329
|
+
default:
|
|
330
|
+
return <DeveloperBanner findText={findText} />;
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
|
|
303
334
|
return (
|
|
304
335
|
<OutletContext.Provider
|
|
305
336
|
value={{
|
|
@@ -381,18 +412,6 @@ const AppMainLayout = ({ children }) => {
|
|
|
381
412
|
)}
|
|
382
413
|
</>
|
|
383
414
|
)}
|
|
384
|
-
{
|
|
385
|
-
// window.location.pathname.includes("enterprise")
|
|
386
|
-
// ? "enterprise"
|
|
387
|
-
// : window.location.pathname.includes("personal")
|
|
388
|
-
// ? "personal"
|
|
389
|
-
// : window.location.pathname.includes("instructor")
|
|
390
|
-
// ? "instructor"
|
|
391
|
-
// : window.location.pathname.includes("developer") ||
|
|
392
|
-
// window.location.hostname.includes("developer")
|
|
393
|
-
// ? "developer"
|
|
394
|
-
// : "developer"
|
|
395
|
-
}
|
|
396
415
|
</LeftLayout>
|
|
397
416
|
<CenterLayout isOpen={isOpen} style={centerLayoutStyle}>
|
|
398
417
|
{window.location.pathname.includes("instructor") &&
|
|
@@ -420,47 +439,34 @@ const AppMainLayout = ({ children }) => {
|
|
|
420
439
|
children ?? <Outlet />
|
|
421
440
|
)}
|
|
422
441
|
</CenterLayout>
|
|
423
|
-
|
|
442
|
+
{showTest && (
|
|
443
|
+
<TestModal
|
|
444
|
+
data={showTest}
|
|
445
|
+
onClose={() => {
|
|
446
|
+
setShowTest(null);
|
|
447
|
+
}}
|
|
448
|
+
/>
|
|
449
|
+
)}
|
|
424
450
|
{rightLayout && !coming && (
|
|
425
451
|
<RightLayout>
|
|
426
452
|
{rightComponent ??
|
|
427
|
-
(
|
|
453
|
+
(activeAccountType === "enterprise" ? (
|
|
428
454
|
<EnterpriseRightBar planState={planState} />
|
|
429
|
-
) :
|
|
430
|
-
"personal/dashboard"
|
|
431
|
-
) ? (
|
|
432
|
-
<PersonalRightBar />
|
|
433
|
-
) : window.location.pathname.includes(
|
|
434
|
-
"personal/addons"
|
|
435
|
-
) ? (
|
|
436
|
-
<InstructorRightBar personal />
|
|
437
|
-
) : window.location.pathname.includes(
|
|
438
|
-
"personal/courses"
|
|
439
|
-
) ? (
|
|
440
|
-
<InstructorRightBar personal />
|
|
441
|
-
) : window.location.pathname.includes(
|
|
442
|
-
"personal/library/selectlanguage"
|
|
443
|
-
) ? (
|
|
444
|
-
<InstructorRightBar personal />
|
|
445
|
-
) : window.location.pathname.includes(
|
|
446
|
-
"personal/library"
|
|
447
|
-
) ? (
|
|
448
|
-
<PersonalRightBar personalLibrary />
|
|
449
|
-
) : window.location.pathname.includes(
|
|
450
|
-
"personal/reports"
|
|
451
|
-
) ? (
|
|
452
|
-
<PersonalRightBar personalReport />
|
|
453
|
-
) : window.location.pathname.includes("instructor") ? (
|
|
455
|
+
) : activeAccountType === "instructor" ? (
|
|
454
456
|
affiliateAccount?.id ? (
|
|
455
457
|
<AffiliateRightBar
|
|
456
458
|
planState={planState}
|
|
457
|
-
affiliateAccount={affiliateAccount
|
|
459
|
+
affiliateAccount={affiliateAccount.id}
|
|
458
460
|
/>
|
|
459
461
|
) : (
|
|
460
462
|
<InstructorRightBar planState={planState} />
|
|
461
463
|
)
|
|
462
|
-
) :
|
|
463
|
-
|
|
464
|
+
) : activeAccountType === "personal" ? (
|
|
465
|
+
<PersonalRightBar
|
|
466
|
+
findText={findText}
|
|
467
|
+
onShowTest={setShowTest}
|
|
468
|
+
/>
|
|
469
|
+
) : activeAccountType === "developer" ? (
|
|
464
470
|
<DeveloperBanner findText={findText} />
|
|
465
471
|
) : (
|
|
466
472
|
<DeveloperBanner findText={findText} />
|
|
@@ -2,11 +2,13 @@ import useAxios from "axios-hooks";
|
|
|
2
2
|
|
|
3
3
|
export default function () {
|
|
4
4
|
const url = `/learn/v1/enterprise`;
|
|
5
|
-
const [{ ...coursesData }, getCoursesData] = useAxios(
|
|
5
|
+
const [{ ...coursesData }, getCoursesData] = useAxios(
|
|
6
|
+
{ method: "GET" },
|
|
7
|
+
{ manual: true }
|
|
8
|
+
);
|
|
6
9
|
|
|
7
10
|
const handleGetCoursesData = async (params) => {
|
|
8
11
|
await getCoursesData({
|
|
9
|
-
method: "GET",
|
|
10
12
|
url: `${url}/courses/`,
|
|
11
13
|
params,
|
|
12
14
|
});
|
|
@@ -17,7 +19,7 @@ export default function () {
|
|
|
17
19
|
{ manual: true }
|
|
18
20
|
);
|
|
19
21
|
const handleremainingSlot = async () => {
|
|
20
|
-
|
|
22
|
+
await remainingSlot({
|
|
21
23
|
url: `${url}/teams/remaining_slot/`,
|
|
22
24
|
});
|
|
23
25
|
};
|
|
@@ -9,6 +9,7 @@ import moment from "moment";
|
|
|
9
9
|
import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
|
|
10
10
|
import { Carousel as ReactCarousl } from "react-responsive-carousel";
|
|
11
11
|
import BoxIcon from "./boxIcon";
|
|
12
|
+
import redirectURL from "../../../utils/redirectURL";
|
|
12
13
|
|
|
13
14
|
const EnterpriseRightBar = ({ planState }) => {
|
|
14
15
|
const {
|
|
@@ -37,10 +38,6 @@ const EnterpriseRightBar = ({ planState }) => {
|
|
|
37
38
|
);
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
const host = window?.location?.hostname;
|
|
41
|
-
const port = window?.location?.port ? `:${window.location.port}` : "";
|
|
42
|
-
const protocol = window?.location?.protocol;
|
|
43
|
-
|
|
44
41
|
return (
|
|
45
42
|
<EnterpriseContainer
|
|
46
43
|
className={planState === "GRACE PERIOD" ? "grace_period" : ""}
|
|
@@ -93,13 +90,15 @@ const EnterpriseRightBar = ({ planState }) => {
|
|
|
93
90
|
boxShadow: "0px 10px 20px 0px rgba(254, 191, 16, 0.25)",
|
|
94
91
|
}}
|
|
95
92
|
onClick={() => {
|
|
96
|
-
window.location.href =
|
|
93
|
+
window.location.href = redirectURL(
|
|
94
|
+
"/enterprise/courses/create-course"
|
|
95
|
+
);
|
|
97
96
|
}}
|
|
98
97
|
/>
|
|
99
98
|
</RecentAddedEnterprie>
|
|
100
99
|
<UpgradeComponent
|
|
101
100
|
UpgradeClick={() => {
|
|
102
|
-
window.location.href =
|
|
101
|
+
window.location.href = redirectURL("/settings/payment");
|
|
103
102
|
}}
|
|
104
103
|
planState={planState}
|
|
105
104
|
siotCount={slotData?.total}
|
|
@@ -10,6 +10,7 @@ import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a lo
|
|
|
10
10
|
import { Carousel as ReactCarousl } from "react-responsive-carousel";
|
|
11
11
|
import BoxIcon from "./boxIcon";
|
|
12
12
|
import InstructorMessage from "./messageSection";
|
|
13
|
+
import redirectURL from "../../../utils/redirectURL";
|
|
13
14
|
|
|
14
15
|
const AffiliateRightBar = ({ planState, affiliateAccount }) => {
|
|
15
16
|
const { handleGetCoursesAffilateData, coursesAffilateData } = api();
|
|
@@ -80,6 +81,9 @@ const AffiliateRightBar = ({ planState, affiliateAccount }) => {
|
|
|
80
81
|
disabled={planState === "GRACE PERIOD"}
|
|
81
82
|
messsage="Create an instructor account to onboard and manage your students with our AI powered platform."
|
|
82
83
|
btnText="Create account"
|
|
84
|
+
onClick={() => {
|
|
85
|
+
window.location.href = redirectURL("/auth/account-type");
|
|
86
|
+
}}
|
|
83
87
|
/>
|
|
84
88
|
</EnterpriseContainer>
|
|
85
89
|
);
|
|
@@ -2,20 +2,24 @@ import useAxios from "axios-hooks";
|
|
|
2
2
|
|
|
3
3
|
export default function () {
|
|
4
4
|
const url = `/learn/v1/instructor`;
|
|
5
|
-
const [{ ...coursesData }, getCoursesData] = useAxios(
|
|
5
|
+
const [{ ...coursesData }, getCoursesData] = useAxios(
|
|
6
|
+
{ method: "GET" },
|
|
7
|
+
{ manual: true }
|
|
8
|
+
);
|
|
6
9
|
|
|
7
10
|
const handleGetCoursesData = async (params) => {
|
|
8
11
|
await getCoursesData({
|
|
9
|
-
method: "GET",
|
|
10
12
|
url: `${url}/courses/`,
|
|
11
13
|
params,
|
|
12
14
|
});
|
|
13
15
|
};
|
|
14
|
-
const [{ ...coursesAffilateData }, getCoursesAffilateData] = useAxios(
|
|
16
|
+
const [{ ...coursesAffilateData }, getCoursesAffilateData] = useAxios(
|
|
17
|
+
{ method: "GET" },
|
|
18
|
+
{ manual: true }
|
|
19
|
+
);
|
|
15
20
|
|
|
16
21
|
const handleGetCoursesAffilateData = async (params, id) => {
|
|
17
22
|
await getCoursesAffilateData({
|
|
18
|
-
method: "GET",
|
|
19
23
|
url: `/learn/v1/instructor/${id}/courses/`,
|
|
20
24
|
params,
|
|
21
25
|
});
|
|
@@ -30,8 +34,36 @@ export default function () {
|
|
|
30
34
|
url: `${url}/teams/remaining_slot/`,
|
|
31
35
|
});
|
|
32
36
|
};
|
|
37
|
+
|
|
38
|
+
const [{ ...coursePersonalData }, coursePersonal] = useAxios(
|
|
39
|
+
{ method: "GET" },
|
|
40
|
+
{ manual: true }
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const handleGetCoursePersonal = async (params) => {
|
|
44
|
+
await coursePersonal({
|
|
45
|
+
url: `/learn/v1/courses/`,
|
|
46
|
+
params,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const [{ ...upcomingTestPersonalData }, upcomingTestPersonal] = useAxios(
|
|
51
|
+
{ method: "GET" },
|
|
52
|
+
{ manual: true }
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const handleGetUpcomingTestPersonal = async (params) => {
|
|
56
|
+
await upcomingTestPersonal({
|
|
57
|
+
url: "/learn/v1/account/upcoming_tests/",
|
|
58
|
+
params,
|
|
59
|
+
});
|
|
60
|
+
};
|
|
33
61
|
return {
|
|
62
|
+
handleGetUpcomingTestPersonal,
|
|
63
|
+
upcomingTestPersonalData,
|
|
34
64
|
handleGetCoursesAffilateData,
|
|
65
|
+
handleGetCoursePersonal,
|
|
66
|
+
coursePersonalData,
|
|
35
67
|
coursesAffilateData,
|
|
36
68
|
coursesData,
|
|
37
69
|
handleGetCoursesData,
|
|
@@ -10,6 +10,7 @@ import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a lo
|
|
|
10
10
|
import { Carousel as ReactCarousl } from "react-responsive-carousel";
|
|
11
11
|
import BoxIcon from "./boxIcon";
|
|
12
12
|
import InstructorMessage from "./messageSection";
|
|
13
|
+
import redirectURL from "../../../utils/redirectURL";
|
|
13
14
|
|
|
14
15
|
const InstructorRightBar = ({ planState }) => {
|
|
15
16
|
const { handleGetCoursesData, coursesData } = api();
|
|
@@ -97,6 +98,9 @@ const InstructorRightBar = ({ planState }) => {
|
|
|
97
98
|
<InstructorMessage
|
|
98
99
|
disabled={planState === "GRACE PERIOD"}
|
|
99
100
|
messsage="Upgrade to ENTERPRISE for more features."
|
|
101
|
+
onClick={() => {
|
|
102
|
+
window.location.href = redirectURL("/auth/account-type");
|
|
103
|
+
}}
|
|
100
104
|
/>
|
|
101
105
|
</EnterpriseContainer>
|
|
102
106
|
);
|
|
@@ -3,19 +3,30 @@ import img from "../../../assets/images/happy-celebrate.png";
|
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
import ButtonComponent from "../../button";
|
|
5
5
|
|
|
6
|
-
const InstructorMessage = ({
|
|
6
|
+
const InstructorMessage = ({
|
|
7
|
+
messsage,
|
|
8
|
+
messsageHTML,
|
|
9
|
+
disabled,
|
|
10
|
+
btnText = "Upgrade",
|
|
11
|
+
onClick,
|
|
12
|
+
}) => {
|
|
7
13
|
return (
|
|
8
14
|
<Container>
|
|
9
15
|
<ImageSection>
|
|
10
16
|
<img src={img} alt="" />
|
|
11
17
|
</ImageSection>
|
|
12
18
|
<Bottom>
|
|
13
|
-
|
|
19
|
+
{messsageHTML ? (
|
|
20
|
+
<p dangerouslySetInnerHTML={{ __html: messsageHTML }}>{messsage}</p>
|
|
21
|
+
) : (
|
|
22
|
+
<p>{messsage}</p>
|
|
23
|
+
)}
|
|
14
24
|
<div>
|
|
15
25
|
<ButtonComponent
|
|
16
26
|
disabled={disabled}
|
|
17
27
|
type="primary"
|
|
18
28
|
text={btnText}
|
|
29
|
+
onClick={onClick}
|
|
19
30
|
styles={{
|
|
20
31
|
marginTop: "14px",
|
|
21
32
|
fontSize: "12px",
|
|
@@ -64,6 +75,10 @@ const Bottom = styled.div`
|
|
|
64
75
|
width: 100%;
|
|
65
76
|
max-width: 170px;
|
|
66
77
|
margin: 0 auto;
|
|
78
|
+
span {
|
|
79
|
+
color: #febf10;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
}
|
|
67
82
|
}
|
|
68
83
|
button {
|
|
69
84
|
&:disabled {
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import Button from "../../button";
|
|
3
|
+
import UpgradeComponent from "./upgrade";
|
|
4
|
+
import api from "./api";
|
|
5
|
+
import styled from "styled-components";
|
|
6
|
+
// import Carousel from "react-multi-carousel";
|
|
7
|
+
// import "react-multi-carousel/lib/styles.css";
|
|
8
|
+
import moment from "moment";
|
|
9
|
+
import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
|
|
10
|
+
import { Carousel as ReactCarousl } from "react-responsive-carousel";
|
|
11
|
+
import BoxIcon from "./boxIcon";
|
|
12
|
+
import InstructorMessage from "./messageSection";
|
|
13
|
+
import redirectURL from "../../../utils/redirectURL";
|
|
14
|
+
import Modal from "../../modalWrapper";
|
|
15
|
+
|
|
16
|
+
const PersonalRightBar = ({ planState, onShowTest }) => {
|
|
17
|
+
const {
|
|
18
|
+
handleGetCoursePersonal,
|
|
19
|
+
coursePersonalData,
|
|
20
|
+
handleGetUpcomingTestPersonal,
|
|
21
|
+
upcomingTestPersonalData,
|
|
22
|
+
} = api();
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
handleGetCoursePersonal({
|
|
26
|
+
"status[]": "ending_soon,active,scheduled",
|
|
27
|
+
page_size: 4,
|
|
28
|
+
});
|
|
29
|
+
handleGetUpcomingTestPersonal({ page_size: 100 });
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
const courses = coursePersonalData?.data?.results;
|
|
33
|
+
const upComingTest = upcomingTestPersonalData?.data?.results;
|
|
34
|
+
|
|
35
|
+
const CustomDots = ({ onClick, isSelected }) => {
|
|
36
|
+
return (
|
|
37
|
+
<CustomDotsContainer
|
|
38
|
+
onClick={onClick}
|
|
39
|
+
className={`${isSelected ? "active" : ""}`}
|
|
40
|
+
></CustomDotsContainer>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<EnterpriseContainer
|
|
46
|
+
className={planState === "GRACE PERIOD" ? "grace_period" : ""}
|
|
47
|
+
>
|
|
48
|
+
<Banner>
|
|
49
|
+
<h3>Courses ending soon</h3>
|
|
50
|
+
{courses?.length > 0 ? (
|
|
51
|
+
<ReactCarousl
|
|
52
|
+
autoPlay
|
|
53
|
+
infiniteLoop={courses?.length > 1}
|
|
54
|
+
showArrows={false}
|
|
55
|
+
showStatus={false}
|
|
56
|
+
showThumbs={false}
|
|
57
|
+
className="carousel-container"
|
|
58
|
+
renderIndicator={(clickHandler, isSelected) => (
|
|
59
|
+
<CustomDots onClick={clickHandler} isSelected={isSelected} />
|
|
60
|
+
)}
|
|
61
|
+
>
|
|
62
|
+
{courses?.map((course) => (
|
|
63
|
+
<Course key={course?.id}>
|
|
64
|
+
<img src={course?.thumbnail_dict?.url} alt="" />
|
|
65
|
+
<div className="content">
|
|
66
|
+
<p className="date">
|
|
67
|
+
<span>Ends:</span>{" "}
|
|
68
|
+
{moment(course?.end_day).format("MMM DD, YYYY")}
|
|
69
|
+
</p>
|
|
70
|
+
<p className="name">{course?.name}</p>
|
|
71
|
+
</div>
|
|
72
|
+
</Course>
|
|
73
|
+
))}
|
|
74
|
+
</ReactCarousl>
|
|
75
|
+
) : (
|
|
76
|
+
<EmptyCourse>
|
|
77
|
+
<BoxIcon />
|
|
78
|
+
<p>There is no course ending in the next 30 days </p>
|
|
79
|
+
</EmptyCourse>
|
|
80
|
+
)}
|
|
81
|
+
</Banner>
|
|
82
|
+
<TestSection>
|
|
83
|
+
{upComingTest?.length > 0 ? (
|
|
84
|
+
<>
|
|
85
|
+
<h2>Upcoming test</h2>
|
|
86
|
+
<div className="content">
|
|
87
|
+
<p className="title">{upComingTest[0]?.title}</p>
|
|
88
|
+
<p className="date">
|
|
89
|
+
{moment(upComingTest[0]?.start_date).format(
|
|
90
|
+
"MMM DD,YYYY || hh:mma"
|
|
91
|
+
)}
|
|
92
|
+
</p>
|
|
93
|
+
</div>
|
|
94
|
+
{upComingTest?.length > 1 && (
|
|
95
|
+
<span
|
|
96
|
+
onClick={() => {
|
|
97
|
+
onShowTest && onShowTest(upComingTest);
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
View all
|
|
101
|
+
</span>
|
|
102
|
+
)}
|
|
103
|
+
</>
|
|
104
|
+
) : (
|
|
105
|
+
<EmptyTest>
|
|
106
|
+
<BoxIcon />
|
|
107
|
+
<p>There is no upcoming test. </p>
|
|
108
|
+
</EmptyTest>
|
|
109
|
+
)}
|
|
110
|
+
</TestSection>
|
|
111
|
+
|
|
112
|
+
<InstructorMessage
|
|
113
|
+
onClick={() => {
|
|
114
|
+
window.location.href = redirectURL("/settings/payment");
|
|
115
|
+
}}
|
|
116
|
+
disabled={planState === "GRACE PERIOD"}
|
|
117
|
+
messsageHTML={
|
|
118
|
+
"Upgrade to <span>Premium</span> <br/> for more features."
|
|
119
|
+
}
|
|
120
|
+
btnText="Upgrade"
|
|
121
|
+
/>
|
|
122
|
+
</EnterpriseContainer>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const CustomDotsContainer = styled.li`
|
|
127
|
+
border-radius: 3.091px;
|
|
128
|
+
background: #dfe5e5;
|
|
129
|
+
width: 8px;
|
|
130
|
+
height: 4px;
|
|
131
|
+
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
&.active {
|
|
134
|
+
background-color: #00c2c2;
|
|
135
|
+
width: 19px;
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
138
|
+
|
|
139
|
+
const Banner = styled.div`
|
|
140
|
+
position: relative;
|
|
141
|
+
padding: 0;
|
|
142
|
+
border-radius: 0;
|
|
143
|
+
padding-bottom: 25px;
|
|
144
|
+
margin-bottom: 20px;
|
|
145
|
+
border-bottom: 1px solid #dfe5e5;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
gap: 10px;
|
|
149
|
+
width: 100%;
|
|
150
|
+
text-align: left;
|
|
151
|
+
|
|
152
|
+
h3 {
|
|
153
|
+
font-size: 14px;
|
|
154
|
+
font-weight: 600;
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
157
|
+
|
|
158
|
+
const TestSection = styled.div`
|
|
159
|
+
padding: 0;
|
|
160
|
+
height: auto;
|
|
161
|
+
padding: 0 0 20px;
|
|
162
|
+
border-bottom: 1px solid #dfe5e5;
|
|
163
|
+
margin-bottom: 52px;
|
|
164
|
+
text-align: left;
|
|
165
|
+
|
|
166
|
+
h2 {
|
|
167
|
+
font-size: 14px;
|
|
168
|
+
font-weight: 600;
|
|
169
|
+
margin-bottom: 10px;
|
|
170
|
+
}
|
|
171
|
+
span {
|
|
172
|
+
font-size: 14px;
|
|
173
|
+
color: #febf10;
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
}
|
|
176
|
+
> .content {
|
|
177
|
+
margin-bottom: 10px;
|
|
178
|
+
.title {
|
|
179
|
+
width: 90%;
|
|
180
|
+
white-space: nowrap;
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
text-overflow: ellipsis;
|
|
183
|
+
font-size: 14px;
|
|
184
|
+
}
|
|
185
|
+
.date {
|
|
186
|
+
font-size: 12px;
|
|
187
|
+
color: #7c8080;
|
|
188
|
+
margin-top: 4px;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
`;
|
|
192
|
+
const EmptyTest = styled.div`
|
|
193
|
+
padding: 0 0 20px;
|
|
194
|
+
border-bottom: 1px solid #dfe5e5;
|
|
195
|
+
text-align: left;
|
|
196
|
+
height: 100px;
|
|
197
|
+
border-radius: 20px;
|
|
198
|
+
background: #f5f7f7;
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-direction: column;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
svg {
|
|
204
|
+
}
|
|
205
|
+
> p {
|
|
206
|
+
color: #636666;
|
|
207
|
+
text-align: center;
|
|
208
|
+
width: 100%;
|
|
209
|
+
max-width: 144px;
|
|
210
|
+
margin: 0 auto;
|
|
211
|
+
font-size: 12px;
|
|
212
|
+
}
|
|
213
|
+
`;
|
|
214
|
+
const EnterpriseContainer = styled.div`
|
|
215
|
+
background: #fff;
|
|
216
|
+
max-width: 232px;
|
|
217
|
+
display: flex;
|
|
218
|
+
/* align-items: center; */
|
|
219
|
+
text-align: center;
|
|
220
|
+
flex-direction: column;
|
|
221
|
+
padding: 10px 0px;
|
|
222
|
+
border-radius: 30px;
|
|
223
|
+
|
|
224
|
+
.library_img {
|
|
225
|
+
padding: 10px;
|
|
226
|
+
margin-top: 20px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* GRACE PERIOD AND DEACTIVATED */
|
|
230
|
+
|
|
231
|
+
&.grace_period {
|
|
232
|
+
border-radius: 30.913px;
|
|
233
|
+
border: 0.773px solid var(--Neutral-20, #dfe5e5);
|
|
234
|
+
background: var(--Neutral-20, #dfe5e5);
|
|
235
|
+
|
|
236
|
+
> div {
|
|
237
|
+
border-radius: 30.913px;
|
|
238
|
+
border: 0.773px solid var(--Neutral-20, #dfe5e5);
|
|
239
|
+
background: var(--Neutral-20, #dfe5e5);
|
|
240
|
+
|
|
241
|
+
> button {
|
|
242
|
+
border-radius: 12px;
|
|
243
|
+
background: var(--Neutral-50, #949999);
|
|
244
|
+
box-shadow: 0px 10px 20px 0px rgba(254, 191, 16, 0.25);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/* height: 580px; */
|
|
249
|
+
width: 231px;
|
|
250
|
+
padding: 20px 12px;
|
|
251
|
+
.carousel-container {
|
|
252
|
+
position: relative;
|
|
253
|
+
|
|
254
|
+
.control-dots {
|
|
255
|
+
position: absolute;
|
|
256
|
+
left: 50%;
|
|
257
|
+
transform: translateX(-50%);
|
|
258
|
+
display: flex;
|
|
259
|
+
align-items: center;
|
|
260
|
+
gap: 10px;
|
|
261
|
+
justify-content: center;
|
|
262
|
+
bottom: 30;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
.more-slot {
|
|
266
|
+
padding: 0px !important;
|
|
267
|
+
}
|
|
268
|
+
`;
|
|
269
|
+
|
|
270
|
+
const Course = styled.div`
|
|
271
|
+
width: 100%;
|
|
272
|
+
|
|
273
|
+
border-radius: 18.548px;
|
|
274
|
+
overflow: hidden;
|
|
275
|
+
position: relative;
|
|
276
|
+
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 34.29%, #000 100%);
|
|
277
|
+
|
|
278
|
+
> .content {
|
|
279
|
+
position: relative;
|
|
280
|
+
z-index: 2;
|
|
281
|
+
flex: 1;
|
|
282
|
+
height: 132px;
|
|
283
|
+
padding: 10px;
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
text-align: left;
|
|
287
|
+
justify-content: space-between;
|
|
288
|
+
> .date {
|
|
289
|
+
border-radius: 6.183px;
|
|
290
|
+
background: #fff;
|
|
291
|
+
display: flex;
|
|
292
|
+
gap: 4px;
|
|
293
|
+
width: fit-content;
|
|
294
|
+
align-items: center;
|
|
295
|
+
height: 22.758px;
|
|
296
|
+
padding: 3px 10px;
|
|
297
|
+
color: #4a4d4d;
|
|
298
|
+
text-align: center;
|
|
299
|
+
font-size: 12px;
|
|
300
|
+
span {
|
|
301
|
+
color: #f95454;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
> .name {
|
|
305
|
+
color: var(--white, #fff);
|
|
306
|
+
font-size: 14px;
|
|
307
|
+
font-weight: 700;
|
|
308
|
+
width: 99%;
|
|
309
|
+
white-space: nowrap;
|
|
310
|
+
overflow: hidden;
|
|
311
|
+
text-overflow: ellipsis;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
img {
|
|
315
|
+
width: 100%;
|
|
316
|
+
height: 100%;
|
|
317
|
+
opacity: 0.4;
|
|
318
|
+
position: absolute;
|
|
319
|
+
inset: 0;
|
|
320
|
+
object-fit: cover;
|
|
321
|
+
}
|
|
322
|
+
`;
|
|
323
|
+
|
|
324
|
+
const EmptyCourse = styled.div`
|
|
325
|
+
height: 132px;
|
|
326
|
+
width: 100%;
|
|
327
|
+
border-radius: 20px;
|
|
328
|
+
background: #f5f7f7;
|
|
329
|
+
display: flex;
|
|
330
|
+
flex-direction: column;
|
|
331
|
+
align-items: center;
|
|
332
|
+
justify-content: center;
|
|
333
|
+
> p {
|
|
334
|
+
color: #636666;
|
|
335
|
+
text-align: center;
|
|
336
|
+
width: 100%;
|
|
337
|
+
max-width: 144px;
|
|
338
|
+
margin: 0 auto;
|
|
339
|
+
font-size: 12px;
|
|
340
|
+
}
|
|
341
|
+
`;
|
|
342
|
+
export default PersonalRightBar;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Modal from "../../modalWrapper";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import moment from "moment";
|
|
5
|
+
|
|
6
|
+
const TestModal = ({ data, onClose }) => {
|
|
7
|
+
return (
|
|
8
|
+
<Modal isOpen width={"640px"} height={"auto"} onClose={onClose}>
|
|
9
|
+
<Container>
|
|
10
|
+
<h2>Upcoming test in the next 30 days</h2>
|
|
11
|
+
<ul>
|
|
12
|
+
{data?.map((test) => (
|
|
13
|
+
<li key={test?.id}>
|
|
14
|
+
<div className="left">
|
|
15
|
+
<Icon />
|
|
16
|
+
<div className="title_section">
|
|
17
|
+
<h3 className="no_wrap">{test?.title}</h3>
|
|
18
|
+
<p className="no_wrap">{test?.course_name}</p>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div className="right">
|
|
22
|
+
<p>
|
|
23
|
+
Start date & start time:{" "}
|
|
24
|
+
<span>
|
|
25
|
+
{moment(test?.start_date).format("MMM DD,YYYY || hh:mma")}
|
|
26
|
+
</span>
|
|
27
|
+
</p>
|
|
28
|
+
<p>
|
|
29
|
+
End date & start time:{" "}
|
|
30
|
+
<span>
|
|
31
|
+
{moment(test?.due_date).format("MMM DD,YYYY || hh:mma")}
|
|
32
|
+
</span>
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
</li>
|
|
36
|
+
))}
|
|
37
|
+
</ul>
|
|
38
|
+
</Container>
|
|
39
|
+
</Modal>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const Container = styled.div`
|
|
44
|
+
padding-bottom: 30px;
|
|
45
|
+
.no_wrap {
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
text-overflow: ellipsis;
|
|
49
|
+
}
|
|
50
|
+
h2 {
|
|
51
|
+
font-size: 20px;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
color: #4a4d4d;
|
|
54
|
+
margin-bottom: 20px;
|
|
55
|
+
}
|
|
56
|
+
ul {
|
|
57
|
+
height: 340px;
|
|
58
|
+
overflow-y: auto;
|
|
59
|
+
width: 100%;
|
|
60
|
+
list-style: none;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 10px;
|
|
64
|
+
width: 100%;
|
|
65
|
+
li {
|
|
66
|
+
background-color: #e9fcfc;
|
|
67
|
+
display: flex;
|
|
68
|
+
padding: 16px 20px;
|
|
69
|
+
border-radius: 15px;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 12px;
|
|
72
|
+
width: 100%;
|
|
73
|
+
.right {
|
|
74
|
+
text-align: right;
|
|
75
|
+
p {
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
color: #949999;
|
|
78
|
+
font-weight: 500;
|
|
79
|
+
span {
|
|
80
|
+
color: #4a4d4d;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
.left {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 12px;
|
|
88
|
+
.title_section {
|
|
89
|
+
width: 200px;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
gap: 3px;
|
|
95
|
+
h3 {
|
|
96
|
+
font-size: 16px;
|
|
97
|
+
font-weight: 600;
|
|
98
|
+
width: 95%;
|
|
99
|
+
}
|
|
100
|
+
p {
|
|
101
|
+
width: 95%;
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
color: #949999;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
export default TestModal;
|
|
111
|
+
|
|
112
|
+
const Icon = () => (
|
|
113
|
+
<svg
|
|
114
|
+
width="26"
|
|
115
|
+
height="26"
|
|
116
|
+
viewBox="0 0 26 26"
|
|
117
|
+
fill="none"
|
|
118
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
119
|
+
>
|
|
120
|
+
<path
|
|
121
|
+
fill-rule="evenodd"
|
|
122
|
+
clip-rule="evenodd"
|
|
123
|
+
d="M20.8438 7.44303C20.8438 6.89015 21.0634 6.35992 21.4543 5.96897C21.8453 5.57803 22.3755 5.3584 22.9284 5.3584C23.4813 5.3584 24.0115 5.57803 24.4024 5.96897C24.7934 6.35992 25.013 6.89015 25.013 7.44303V21.5512L22.9284 24.6781L20.8438 21.5512V7.44303ZM22.9284 6.74816C22.7441 6.74816 22.5673 6.82137 22.437 6.95168C22.3067 7.082 22.2335 7.25874 22.2335 7.44303V21.1301L22.9284 22.1724L23.6233 21.1301V7.44303C23.6233 7.25874 23.5501 7.082 23.4197 6.95168C23.2894 6.82137 23.1127 6.74816 22.9284 6.74816Z"
|
|
124
|
+
fill="#00C2C2"
|
|
125
|
+
/>
|
|
126
|
+
<path
|
|
127
|
+
fill-rule="evenodd"
|
|
128
|
+
clip-rule="evenodd"
|
|
129
|
+
d="M24.3207 10.2205H21.5412V8.83073H24.3207V10.2205ZM2.77951 1.88194C2.41093 1.88194 2.05744 2.02837 1.79681 2.289C1.53618 2.54962 1.38976 2.90311 1.38976 3.2717V22.7283C1.38976 23.0969 1.53618 23.4504 1.79681 23.711C2.05744 23.9716 2.41093 24.1181 2.77951 24.1181H16.6771C17.0457 24.1181 17.3992 23.9716 17.6598 23.711C17.9204 23.4504 18.0668 23.0969 18.0668 22.7283V3.2717C18.0668 2.90311 17.9204 2.54962 17.6598 2.289C17.3992 2.02837 17.0457 1.88194 16.6771 1.88194H2.77951ZM0 3.2717C0 2.53453 0.292841 1.82755 0.814101 1.30629C1.33536 0.785028 2.04234 0.492188 2.77951 0.492188H16.6771C17.4143 0.492188 18.1212 0.785028 18.6425 1.30629C19.1638 1.82755 19.4566 2.53453 19.4566 3.2717V22.7283C19.4566 23.4655 19.1638 24.1725 18.6425 24.6937C18.1212 25.215 17.4143 25.5078 16.6771 25.5078H2.77951C2.04234 25.5078 1.33536 25.215 0.814101 24.6937C0.292841 24.1725 0 23.4655 0 22.7283V3.2717Z"
|
|
130
|
+
fill="#00C2C2"
|
|
131
|
+
/>
|
|
132
|
+
<path
|
|
133
|
+
fill-rule="evenodd"
|
|
134
|
+
clip-rule="evenodd"
|
|
135
|
+
d="M9.73076 6.74468C9.73076 6.56039 9.80397 6.38364 9.93429 6.25333C10.0646 6.12302 10.2413 6.0498 10.4256 6.0498H15.9847C16.169 6.0498 16.3457 6.12302 16.476 6.25333C16.6063 6.38364 16.6795 6.56039 16.6795 6.74468C16.6795 6.92898 16.6063 7.10572 16.476 7.23604C16.3457 7.36635 16.169 7.43956 15.9847 7.43956H10.4256C10.2413 7.43956 10.0646 7.36635 9.93429 7.23604C9.80397 7.10572 9.73076 6.92898 9.73076 6.74468ZM9.73076 9.5242C9.73076 9.3399 9.80397 9.16316 9.93429 9.03284C10.0646 8.90253 10.2413 8.82932 10.4256 8.82932H15.9847C16.169 8.82932 16.3457 8.90253 16.476 9.03284C16.6063 9.16316 16.6795 9.3399 16.6795 9.5242C16.6795 9.70849 16.6063 9.88524 16.476 10.0156C16.3457 10.1459 16.169 10.2191 15.9847 10.2191H10.4256C10.2413 10.2191 10.0646 10.1459 9.93429 10.0156C9.80397 9.88524 9.73076 9.70849 9.73076 9.5242ZM9.73076 15.7781C9.73076 15.5938 9.80397 15.4171 9.93429 15.2867C10.0646 15.1564 10.2413 15.0832 10.4256 15.0832H15.9847C16.169 15.0832 16.3457 15.1564 16.476 15.2867C16.6063 15.4171 16.6795 15.5938 16.6795 15.7781C16.6795 15.9624 16.6063 16.1391 16.476 16.2695C16.3457 16.3998 16.169 16.473 15.9847 16.473H10.4256C10.2413 16.473 10.0646 16.3998 9.93429 16.2695C9.80397 16.1391 9.73076 15.9624 9.73076 15.7781ZM9.73076 18.5576C9.73076 18.3733 9.80397 18.1966 9.93429 18.0663C10.0646 17.9359 10.2413 17.8627 10.4256 17.8627H15.9847C16.169 17.8627 16.3457 17.9359 16.476 18.0663C16.6063 18.1966 16.6795 18.3733 16.6795 18.5576C16.6795 18.7419 16.6063 18.9187 16.476 19.049C16.3457 19.1793 16.169 19.2525 15.9847 19.2525H10.4256C10.2413 19.2525 10.0646 19.1793 9.93429 19.049C9.80397 18.9187 9.73076 18.7419 9.73076 18.5576ZM4.17173 15.7781V17.8627H6.25637V15.7781H4.17173ZM3.47686 14.3883H6.95125C7.13554 14.3883 7.31229 14.4616 7.4426 14.5919C7.57292 14.7222 7.64613 14.8989 7.64613 15.0832V18.5576C7.64613 18.7419 7.57292 18.9187 7.4426 19.049C7.31229 19.1793 7.13554 19.2525 6.95125 19.2525H3.47686C3.29256 19.2525 3.11582 19.1793 2.9855 19.049C2.85519 18.9187 2.78198 18.7419 2.78198 18.5576V15.0832C2.78198 14.8989 2.85519 14.7222 2.9855 14.5919C3.11582 14.4616 3.29256 14.3883 3.47686 14.3883ZM8.13741 6.2534C8.26767 6.38371 8.34086 6.56043 8.34086 6.74468C8.34086 6.92894 8.26767 7.10565 8.13741 7.23596L4.86661 10.5068L2.98558 8.62572C2.91921 8.56162 2.86627 8.48494 2.82985 8.40016C2.79343 8.31539 2.77427 8.2242 2.77346 8.13194C2.77266 8.03967 2.79024 7.94817 2.82518 7.86278C2.86012 7.77738 2.91172 7.69979 2.97696 7.63455C3.04221 7.5693 3.11979 7.51771 3.20519 7.48277C3.29059 7.44783 3.38209 7.43025 3.47435 7.43105C3.56662 7.43185 3.6578 7.45102 3.74258 7.48744C3.82736 7.52386 3.90403 7.57679 3.96813 7.64316L4.86661 8.54164L7.15485 6.2534C7.28516 6.12313 7.46187 6.04995 7.64613 6.04995C7.83038 6.04995 8.0071 6.12313 8.13741 6.2534Z"
|
|
136
|
+
fill="#00C2C2"
|
|
137
|
+
/>
|
|
138
|
+
</svg>
|
|
139
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { ModalWrapper, ModalContent, CloseButton } from './style';
|
|
3
|
+
|
|
4
|
+
const Modal = ({ isOpen, onClose, children, width, height, display, top, left, marginTop, marginLeft }) => {
|
|
5
|
+
return (
|
|
6
|
+
<ModalWrapper isOpen={isOpen} width={width} height={height} top={top} left={left}>
|
|
7
|
+
<ModalContent width={width} height={height} marginTop={marginTop} marginLeft={marginLeft}>
|
|
8
|
+
<CloseButton onClick={onClose} display={display}>×</CloseButton>
|
|
9
|
+
{children}
|
|
10
|
+
</ModalContent>
|
|
11
|
+
</ModalWrapper>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default Modal;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const ModalWrapper = styled.div`
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
display: ${({ isOpen }) => (isOpen ? "flex" : "none")};
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
13
|
+
z-index: 999;
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
export const ModalContent = styled.div`
|
|
17
|
+
position: relative;
|
|
18
|
+
width: ${({ width }) => (width ? width : "70%")};
|
|
19
|
+
// max-width: 70%;
|
|
20
|
+
height: ${({ height }) => (height ? height : "70%")};
|
|
21
|
+
background-color: white;
|
|
22
|
+
padding: 15px 20px;
|
|
23
|
+
/* overflow: hidden; */
|
|
24
|
+
/* overflow-y: auto; */
|
|
25
|
+
border-radius: 30px;
|
|
26
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
export const CloseButton = styled.button`
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: -50px;
|
|
32
|
+
right: 15px;
|
|
33
|
+
width: 40px;
|
|
34
|
+
height: 40px;
|
|
35
|
+
border-radius: 30px;
|
|
36
|
+
background-color: white;
|
|
37
|
+
border: none;
|
|
38
|
+
font-size: 20px;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
display: ${({ display }) => (display ? display : "block")};
|
|
41
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const redirectURL = (path) => {
|
|
2
|
+
const host = window?.location?.hostname;
|
|
3
|
+
const port = window?.location?.port ? `:${window.location.port}` : "";
|
|
4
|
+
const protocol = window?.location?.protocol;
|
|
5
|
+
return `${protocol}//${host}${port}${path}`;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default redirectURL;
|