l-min-components 1.0.993 → 1.0.1002

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.993",
3
+ "version": "1.0.1002",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -50,12 +50,14 @@
50
50
  "react-modal": "^3.16.1",
51
51
  "react-player": "^2.15.1",
52
52
  "react-router-dom": "^6.8.2",
53
+ "react-slick": "^0.30.2",
53
54
  "react-toastify": "^9.1.3",
54
55
  "react-tooltip": "^5.10.1",
55
56
  "screenfull": "^6.0.2",
56
57
  "slate": "^0.94.0",
57
58
  "slate-history": "^0.93.0",
58
59
  "slate-react": "^0.94.0",
60
+ "slick-carousel": "^1.8.1",
59
61
  "styled-components": "6.1.1",
60
62
  "wavesurfer.js": "^7.1.5"
61
63
  },
@@ -13,6 +13,7 @@ import {
13
13
  SideNav as SideBar,
14
14
  SideMenu,
15
15
  FullPageLoader,
16
+ DeveloperBanner
16
17
  } from "../";
17
18
  import { leftNavMenu, user, sideMenuOptions } from "../../hooks/leftNavMenu";
18
19
  import InstructorAccountSwitcher from "../instructorAccountSwitcher";
@@ -186,6 +187,15 @@ const AppMainLayout = () => {
186
187
  "Download on google play",
187
188
  "Download on apple store",
188
189
  "Help",
190
+ "10% off your next subscription purchase?",
191
+ "Let's go!",
192
+ "Get a discount when you upgrade to a custom plan and unlock a new world of building.",
193
+ "Contact us",
194
+ "Get more API calls for less with our custom plan",
195
+ "Upgrade now for a 10% discount.",
196
+ "Build the future with Learngual!",
197
+ "Choose our custom plans for more calls and better flexibility.",
198
+
189
199
  ];
190
200
 
191
201
  const {
@@ -343,7 +353,7 @@ const AppMainLayout = () => {
343
353
  !window.location.pathname.includes("file-manager") ? (
344
354
  <InstructorRightBar />
345
355
  ) : window.location.pathname.includes("developer") ? (
346
- <Banner findText={findText} />
356
+ <DeveloperBanner findText={findText} />
347
357
  ) : (
348
358
  <Banner findText={findText} />
349
359
  ))}
@@ -0,0 +1,127 @@
1
+ import React, { useContext } from "react";
2
+ import { DevBannerWrapper } from "./styles";
3
+ import BannerImg from "./assets/book.png";
4
+ import BannerImg2 from "./assets/pack.png";
5
+ import BannerImg3 from "./assets/globe.png";
6
+ import Button from "../button";
7
+ import Slider from "react-slick";
8
+ import "slick-carousel/slick/slick.css";
9
+ import "slick-carousel/slick/slick-theme.css";
10
+
11
+ const DeveloperBanner = ({ findText }) => {
12
+ const settings = {
13
+ dots: true,
14
+ infinite: true,
15
+ speed: 500,
16
+ slidesToShow: 1,
17
+ slidesToScroll: 1,
18
+ autoplay: true,
19
+ autoplaySpeed: 10000,
20
+ pauseOnHover: true
21
+ };
22
+ return (
23
+ <DevBannerWrapper>
24
+ <Slider {...settings}>
25
+ <div>
26
+ <div className="dv_main">
27
+ <img src={BannerImg} alt="Banner" />
28
+
29
+ <div className="dev_ban_inner">
30
+ <p className="dev_banner_title">
31
+ {findText("10% off your next subscription purchase?")}
32
+ </p>
33
+ <p className="dev_banner_subtitle"> {findText("Let's go!")} </p>
34
+ <p className="dev_banner_txt">
35
+ {findText(
36
+ "Get a discount when you upgrade to a custom plan and unlock a new world of building."
37
+ )}
38
+ </p>
39
+ <Button
40
+ type="primary"
41
+ text={findText("Contact us")}
42
+ styles={{
43
+ fontSize: "16px",
44
+ padding: "11px 5px",
45
+ width: "100%",
46
+ gap: "8px",
47
+ height: "44px",
48
+ marginBottom: "25px",
49
+ boxShadow: "0px 10px 20px 0px rgba(254, 191, 16, 0.25)"
50
+ }}
51
+ />
52
+ </div>
53
+ </div>
54
+ </div>
55
+ {/* slider 2 */}
56
+ <div>
57
+ <div className="dv_main">
58
+ <img src={BannerImg2} alt="Banner" />
59
+
60
+ <div className="dev_ban_inner">
61
+ <p className="dev_banner_title" style={{
62
+ padding: "20px 0 10px"
63
+ }}>
64
+ {findText(
65
+ "Get more API calls for less with our custom plan"
66
+ )}
67
+ </p>
68
+ <p className="dev_banner_txt">
69
+ {findText("Upgrade now for a 10% discount.")}
70
+ </p>
71
+ <Button
72
+ type="primary"
73
+ text={findText("Contact us")}
74
+ styles={{
75
+ fontSize: "16px",
76
+ padding: "11px 5px",
77
+ width: "100%",
78
+ gap: "8px",
79
+ height: "44px",
80
+ marginTop: "65px",
81
+ marginBottom: "25px",
82
+ boxShadow: "0px 10px 20px 0px rgba(254, 191, 16, 0.25)"
83
+ }}
84
+ />
85
+ </div>
86
+ </div>
87
+ </div>
88
+
89
+ {/* slider 3 */}
90
+ <div>
91
+ <div className="dv_main">
92
+ <img src={BannerImg3} alt="Banner" />
93
+
94
+ <div className="dev_ban_inner">
95
+ <p className="dev_banner_title" style={{
96
+ padding: "20px 0 10px"
97
+ }}>
98
+ {findText("Build the future with Learngual!")}
99
+ </p>
100
+ <p className="dev_banner_txt">
101
+ {findText(
102
+ "Choose our custom plans for more calls and better flexibility."
103
+ )}
104
+ </p>
105
+ <Button
106
+ type="primary"
107
+ text={findText("Contact us")}
108
+ styles={{
109
+ fontSize: "16px",
110
+ padding: "11px 5px",
111
+ width: "100%",
112
+ gap: "8px",
113
+ height: "44px",
114
+ marginTop: "78px",
115
+ marginBottom: "25px",
116
+ boxShadow: "0px 10px 20px 0px rgba(254, 191, 16, 0.25)"
117
+ }}
118
+ />
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </Slider>
123
+ </DevBannerWrapper>
124
+ );
125
+ };
126
+
127
+ export default DeveloperBanner;
@@ -1,6 +1,6 @@
1
1
  import styled from "styled-components";
2
2
  import { FaArrowRight } from "react-icons/fa";
3
- import BannerImg from "../assets/Vector19.png"
3
+ import BannerImg from "../assets/Vector19.png";
4
4
 
5
5
  export const BannerWrapper = styled.div`
6
6
  position: relative;
@@ -19,8 +19,13 @@ export const BannerWrapper = styled.div`
19
19
  background-repeat: no-repeat;
20
20
  background-position: bottom right;
21
21
  background-size: contain;
22
- border: 1px solid #C6CCCC;
22
+ border: 1px solid #c6cccc;
23
23
 
24
+ &.bg_dev_banner {
25
+ border-radius: 20px;
26
+ background: linear-gradient(180deg, #00c2c2 0%, #005c5c 100%);
27
+ border: none;
28
+ }
24
29
  `;
25
30
 
26
31
  export const BannerTitle = styled.h1`
@@ -28,14 +33,13 @@ export const BannerTitle = styled.h1`
28
33
  margin: 0;
29
34
  font-weight: 800;
30
35
  line-height: 42px;
31
- color: #00C2C2;
32
-
36
+ color: #00c2c2;
33
37
  `;
34
38
 
35
39
  export const BannerSubtitle = styled.p`
36
40
  font-size: 18px;
37
41
  margin: 29px 0;
38
- color: #00C2C2;
42
+ color: #00c2c2;
39
43
  font-weight: 600;
40
44
  `;
41
45
 
@@ -44,9 +48,9 @@ export const BannerImage = styled.img`
44
48
  max-width: 800px;
45
49
  margin-bottom: -15px;
46
50
  margin-top: -10px;
47
- opacity: 2;
48
- display: block;
49
- opacity: 1.0;
51
+ opacity: 2;
52
+ display: block;
53
+ opacity: 1;
50
54
  `;
51
55
 
52
56
  export const BannerCTA = styled.button`
@@ -60,7 +64,7 @@ export const BannerCTA = styled.button`
60
64
  align-items: center;
61
65
  transition: all 0.2s ease-in-out;
62
66
  margin: auto 0 10px;
63
- opacity: 1.0;
67
+ opacity: 1;
64
68
 
65
69
  &:hover {
66
70
  background-color: #0062cc;
@@ -79,3 +83,99 @@ export const AbsoluteSVG = styled.svg`
79
83
  width: 100%;
80
84
  height: auto;
81
85
  `;
86
+
87
+ export const DevBannerWrapper = styled.div`
88
+ position: relative;
89
+ max-width: 232px;
90
+ padding: 42px 10px 47px;
91
+ overflow: hidden;
92
+ background-color: #ffffff;
93
+ border-radius: 36px;
94
+ border: none;
95
+ /* height: 638px; */
96
+
97
+ .dev_ban_inner {
98
+ border-radius: 36px;
99
+ padding: 16px 13px 30px;
100
+ background: linear-gradient(180deg, #00c2c2 0%, #005c5c 100%);
101
+ position: relative;
102
+ display: flex;
103
+ flex-direction: column;
104
+ align-items: center;
105
+ text-align: center;
106
+ height: 575px;
107
+ width: 182px;
108
+ margin: 0 auto;
109
+ }
110
+
111
+ .dev_banner_title {
112
+ color: #febf10;
113
+ text-align: center;
114
+ font-family: "Nunito Sans";
115
+ font-size: 18px;
116
+ font-weight: 700;
117
+ letter-spacing: 0.36px;
118
+ margin-bottom: 10px;
119
+ margin-top: 220px;
120
+ }
121
+
122
+ .dev_banner_subtitle {
123
+ color: #febf10;
124
+ text-align: center;
125
+ font-family: "Nunito Sans";
126
+ font-size: 18px;
127
+ font-weight: 600;
128
+ letter-spacing: 0.36px;
129
+ margin-bottom: 20px;
130
+ }
131
+ .dev_banner_txt {
132
+ color: #fff;
133
+ text-align: center;
134
+ font-family: "Nunito Sans";
135
+ font-size: 16px;
136
+ font-weight: 400;
137
+ letter-spacing: 0.32px;
138
+ margin-bottom: 20px;
139
+ }
140
+
141
+ img {
142
+ width: 203px;
143
+ position: absolute;
144
+ top: 16px;
145
+ z-index: 2;
146
+ }
147
+
148
+ .dv_main {
149
+ position: relative;
150
+ /* padding: 0 16px; */
151
+ height: 100%;
152
+ display: flex;
153
+ justify-content: center;
154
+ }
155
+
156
+ .slick-dots li.slick-active button:before,
157
+ .slick-dots li button:before {
158
+ content: "";
159
+ display: none;
160
+ }
161
+
162
+ .slick-dots li.slick-active button {
163
+ width: 39px !important;
164
+ height: 5px !important;
165
+ background: #febf10;
166
+ border-radius: 0;
167
+ }
168
+
169
+ .slick-dots li button {
170
+ width: 8px;
171
+ height: 8px;
172
+ background: #d9d9d9;
173
+ border-radius: 100%;
174
+ padding: 0;
175
+ }
176
+
177
+ .slick-dots li {
178
+ width: auto;
179
+ height: auto;
180
+ }
181
+ `;
@@ -52,4 +52,5 @@ export { default as AdminCreateRolesPermissions } from "./AdminRolesPermission/c
52
52
  export { default as MobileLayout } from "./mobileLayout";
53
53
  export { default as useTranslation } from "../hooks/useTranslation";
54
54
  export { default as ImageComponent } from "./ImageComponent";
55
+ export { default as DeveloperBanner } from "./banner/developerBanner";
55
56
 
@@ -1,5 +1,6 @@
1
1
  import React, {
2
2
  useCallback,
3
+ useContext,
3
4
  useEffect,
4
5
  useLayoutEffect,
5
6
  useRef,
@@ -23,6 +24,8 @@ import useMessaging from "../hooks/useMessaging";
23
24
  import useMedia from "../hooks/useMedia";
24
25
  import { getCookie } from "../utils/helpers";
25
26
  import InputEmoji from "react-input-emoji";
27
+ import { useLocation } from "react-router-dom";
28
+ import MessagesContext from "../hooks/messagesContext";
26
29
 
27
30
  /** The input section of an open chat, for sending texts, emojis and audios
28
31
  *
@@ -38,21 +41,31 @@ const InputSection = ({
38
41
  setNewMessages,
39
42
  setIsMessageSending,
40
43
  }) => {
44
+ const { affiliates, courseID } = useContext(MessagesContext);
41
45
  const [showEmoji, setShowEmoji] = useState();
42
46
  const [inputMethod, setInputMethod] = useState("text"); // text | recorder
43
- const [text, setText] = useState({ text: "", user_message: true }); // state for user text
47
+ const [text, setText] = useState({
48
+ text: "",
49
+ // user_message: true
50
+ }); // state for user text
44
51
  const [blobData, setBlobData] = useState({}); //state for audio
45
52
  const [recording, setRecording] = useState(false);
53
+ const { pathname } = useLocation();
54
+ const accountType = pathname.split("/")[1]?.toLowerCase();
55
+
46
56
  const imageRef = useRef();
47
57
  const {
48
58
  handleCreateMessage,
49
59
  createMessageData,
50
60
  handleCreateMessageWithMedia,
51
61
  createMessageWithMediaData,
62
+ handleCreateMessageAffiliate,
63
+ createMessagePersonalData,
64
+ handleCreateMessagePersonal,
52
65
  } = useMessaging();
53
66
  const { handleUploadMedia, uploadMediaData } = useMedia();
54
67
 
55
- //console.log(text);
68
+ // console.log(text);
56
69
 
57
70
  // Handle Send when Enter key pressed
58
71
  const handleEnterKey = (e) => {
@@ -79,9 +92,29 @@ const InputSection = ({
79
92
  if (inputMethod === "text") {
80
93
  // setNewMessages((prev) => [...prev, text]);
81
94
  setIsMessageSending(true);
82
- setTimeout(() => {
83
- handleCreateMessage(userID, text);
84
- }, 1000);
95
+ if (affiliates && accountType === "instructor") {
96
+ setTimeout(() => {
97
+ handleCreateMessageAffiliate(userID, text);
98
+ }, 1000);
99
+ }
100
+
101
+ if (!affiliates && accountType === "instructor") {
102
+ setTimeout(() => {
103
+ handleCreateMessage(userID, accountType, text);
104
+ }, 1000);
105
+ }
106
+
107
+ if (accountType === "enterprise") {
108
+ setTimeout(() => {
109
+ handleCreateMessage(userID, accountType, text, courseID);
110
+ }, 1000);
111
+ }
112
+
113
+ if (accountType === "personal") {
114
+ setTimeout(() => {
115
+ handleCreateMessagePersonal(userID, text, courseID);
116
+ }, 1000);
117
+ }
85
118
  }
86
119
  };
87
120
 
@@ -120,16 +153,17 @@ const InputSection = ({
120
153
 
121
154
  //handle update messages state when a message sent successfully for text and audio ends here
122
155
 
123
- //console.log("media", mediaForm);
124
- //console.log("media2", uploadMediaData);
125
- //console.log("media3", imageRef);
156
+ // console.log("media", mediaForm);
157
+ // console.log("media2", uploadMediaData);
158
+ // console.log("media3", imageRef);
126
159
 
127
160
  return (
128
161
  <TextMessagePanel>
129
162
  <div
130
163
  className={cx("text-input-wrapper", {
131
164
  "text-mode": inputMethod === "text",
132
- })}>
165
+ })}
166
+ >
133
167
  {inputMethod === "text" && (
134
168
  <>
135
169
  <div className="icon-box">
@@ -144,7 +178,7 @@ const InputSection = ({
144
178
  accept="image/*"
145
179
  style={{ display: "none" }}
146
180
  onChange={async (e) => {
147
- //console.log("media", e);
181
+ console.log("media", e);
148
182
  if (e.target.files) {
149
183
  const file = e.target.files[0];
150
184
  let imageDataUrl = await readFile(file);
@@ -159,7 +193,8 @@ const InputSection = ({
159
193
  <span
160
194
  onClick={(e) => {
161
195
  setInputMethod("recorder");
162
- }}>
196
+ }}
197
+ >
163
198
  <MicrophoneIcon />
164
199
  </span>
165
200
  </div>
@@ -201,7 +236,8 @@ const InputSection = ({
201
236
  disabled={
202
237
  !text.text &&
203
238
  (inputMethod === "text" || recording || createMessageData?.loading)
204
- }>
239
+ }
240
+ >
205
241
  <SendIcon />
206
242
  </button>
207
243
  </TextMessagePanel>
@@ -302,7 +338,8 @@ const Recorder = ({
302
338
  className="icon"
303
339
  onClick={() => {
304
340
  waveSurfer.current.playPause();
305
- }}>
341
+ }}
342
+ >
306
343
  <RecorderPlayIcon />
307
344
  </span>
308
345
  )}
@@ -312,7 +349,8 @@ const Recorder = ({
312
349
  className="icon"
313
350
  onClick={
314
351
  () => setInputMethod("text") // resetting input method, everything about recorder shutdown
315
- }>
352
+ }
353
+ >
316
354
  <Bin />
317
355
  </span>
318
356
  )}
@@ -1,50 +1,55 @@
1
1
  import React from "react";
2
2
  export const NoMessage = ({ width, height, fill }) => (
3
3
  <svg
4
- width={width || "65"}
5
- height={height || "65"}
6
- viewBox="0 0 65 65"
7
- fill="none"
8
4
  xmlns="http://www.w3.org/2000/svg"
5
+ width={width || "80"}
6
+ height={width || "74"}
7
+ viewBox="0 0 80 74"
8
+ fill="none"
9
9
  >
10
- <g id="vuesax/linear/message">
11
- <g id="vuesax/linear/message_2">
12
- <g id="message">
13
- <path
14
- id="Vector"
15
- d="M23.1423 50.7943H21.8056C11.1123 50.7943 5.76562 48.121 5.76562 34.7543V21.3877C5.76562 10.6943 11.1123 5.34766 21.8056 5.34766H43.1923C53.8856 5.34766 59.2323 10.6943 59.2323 21.3877V34.7543C59.2323 45.4477 53.8856 50.7943 43.1923 50.7943H41.8556C41.0269 50.7943 40.2249 51.1953 39.717 51.8637L35.707 57.2103C33.9426 59.5629 31.0554 59.5629 29.291 57.2103L25.281 51.8637C24.8532 51.2755 23.8641 50.7943 23.1423 50.7943Z"
16
- stroke="#C6CCCC"
17
- stroke-width="4.40659"
18
- stroke-miterlimit="10"
19
- stroke-linecap="round"
20
- stroke-linejoin="round"
21
- />
22
- <path
23
- id="Vector_2"
24
- d="M43.197 29.407H43.221"
25
- stroke="#C6CCCC"
26
- stroke-width="5.87546"
27
- stroke-linecap="round"
28
- stroke-linejoin="round"
29
- />
30
- <path
31
- id="Vector_3"
32
- d="M32.5017 29.407H32.5257"
33
- stroke="#C6CCCC"
34
- stroke-width="5.87546"
35
- stroke-linecap="round"
36
- stroke-linejoin="round"
37
- />
38
- <path
39
- id="Vector_4"
40
- d="M21.8064 29.407H21.8304"
41
- stroke="#C6CCCC"
42
- stroke-width="5.87546"
43
- stroke-linecap="round"
44
- stroke-linejoin="round"
45
- />
46
- </g>
47
- </g>
48
- </g>
10
+ <path
11
+ d="M39.4173 5.05469C18.2866 5.05469 1.15332 19.2352 1.15332 36.7308C1.15332 44.7106 4.71889 52.0007 10.602 57.5737C10.9518 57.9057 11.196 58.3334 11.3041 58.8034C11.4123 59.2734 11.3795 59.7648 11.21 60.2163L7.69148 69.6824C7.52971 70.1326 7.50157 70.62 7.61043 71.0859C7.71929 71.5518 7.96048 71.9763 8.30502 72.3082C8.64956 72.6402 9.08272 72.8655 9.55233 72.9569C10.0219 73.0484 10.508 73.0021 10.9519 72.8237L25.4377 66.814C25.9437 66.6012 26.5067 66.5654 27.0356 66.7123C31.0652 67.8443 35.2317 68.4146 39.4173 68.407C60.5504 68.407 77.6837 54.2264 77.6837 36.7333C77.6837 19.2402 60.5504 5.05469 39.4173 5.05469Z"
12
+ fill="white"
13
+ stroke="#6D6E71"
14
+ stroke-width="1.98503"
15
+ stroke-linecap="round"
16
+ stroke-linejoin="round"
17
+ />
18
+ <path
19
+ d="M65.9471 26.8004C73.0717 26.8004 78.8473 21.0248 78.8473 13.9002C78.8473 6.77563 73.0717 1 65.9471 1C58.8225 1 53.0469 6.77563 53.0469 13.9002C53.0469 21.0248 58.8225 26.8004 65.9471 26.8004Z"
20
+ fill="#FABD1C"
21
+ stroke="#9E705B"
22
+ stroke-width="1.98503"
23
+ stroke-linecap="round"
24
+ stroke-linejoin="round"
25
+ />
26
+ <path
27
+ d="M65.9457 22.3426C64.5955 22.3407 63.3012 21.8033 62.3467 20.8483C61.3922 19.8933 60.8554 18.5987 60.8541 17.2485V10.5491C60.8167 9.85791 60.9206 9.16644 61.1593 8.51677C61.398 7.86709 61.7667 7.27289 62.2427 6.77041C62.7187 6.26794 63.2921 5.86772 63.9279 5.59423C64.5638 5.32073 65.2486 5.17969 65.9408 5.17969C66.6329 5.17969 67.3178 5.32073 67.9537 5.59423C68.5895 5.86772 69.1629 6.26794 69.6389 6.77041C70.1149 7.27289 70.4835 7.86709 70.7223 8.51677C70.961 9.16644 71.0648 9.85791 71.0274 10.5491V17.2485C71.0261 18.597 70.4907 19.8901 69.5383 20.8448C68.586 21.7995 67.2942 22.338 65.9457 22.3426ZM65.9457 8.19928C65.321 8.20059 64.7222 8.44936 64.2804 8.89114C63.8386 9.33292 63.5898 9.93173 63.5885 10.5565V17.256C63.5885 17.8812 63.8369 18.4807 64.2789 18.9228C64.721 19.3649 65.3206 19.6132 65.9457 19.6132C66.5709 19.6132 67.1705 19.3649 67.6125 18.9228C68.0546 18.4807 68.303 17.8812 68.303 17.256V10.5565C68.3036 10.2464 68.2432 9.93926 68.125 9.65255C68.0069 9.36585 67.8334 9.10524 67.6145 8.88563C67.3956 8.66602 67.1355 8.49169 66.8491 8.37265C66.5628 8.25361 66.2558 8.19215 65.9457 8.19183V8.19928Z"
28
+ fill="white"
29
+ />
30
+ <path
31
+ d="M19.5276 38.7543C21.3474 38.7543 22.8227 37.2791 22.8227 35.4592C22.8227 33.6394 21.3474 32.1641 19.5276 32.1641C17.7077 32.1641 16.2324 33.6394 16.2324 35.4592C16.2324 37.2791 17.7077 38.7543 19.5276 38.7543Z"
32
+ fill="#29BDBD"
33
+ stroke="#0F7D7E"
34
+ stroke-width="0.779125"
35
+ stroke-linecap="round"
36
+ stroke-linejoin="round"
37
+ />
38
+ <path
39
+ d="M39.4182 38.7543C41.238 38.7543 42.7133 37.2791 42.7133 35.4592C42.7133 33.6394 41.238 32.1641 39.4182 32.1641C37.5983 32.1641 36.123 33.6394 36.123 35.4592C36.123 37.2791 37.5983 38.7543 39.4182 38.7543Z"
40
+ fill="#29BDBD"
41
+ stroke="#0F7D7E"
42
+ stroke-width="0.779125"
43
+ stroke-linecap="round"
44
+ stroke-linejoin="round"
45
+ />
46
+ <path
47
+ d="M57.5579 38.7543C59.3777 38.7543 60.853 37.2791 60.853 35.4592C60.853 33.6394 59.3777 32.1641 57.5579 32.1641C55.738 32.1641 54.2627 33.6394 54.2627 35.4592C54.2627 37.2791 55.738 38.7543 57.5579 38.7543Z"
48
+ fill="#29BDBD"
49
+ stroke="#0F7D7E"
50
+ stroke-width="0.779125"
51
+ stroke-linecap="round"
52
+ stroke-linejoin="round"
53
+ />
49
54
  </svg>
50
55
  );
@@ -1,10 +1,15 @@
1
- import React, { createContext, useState } from "react";
1
+ import { createContext, useState } from "react";
2
2
  const MessagesContext = createContext();
3
3
 
4
4
  export const useMessagesContext = () => {
5
5
  const [roomID, setRoomID] = useState("");
6
+ const [courseID, setCourseID] = useState("");
6
7
  const [userID, setUserID] = useState("");
8
+ const [receiverID, setReceiverID] = useState("");
7
9
  const [userChatList, setUserChatList] = useState([]);
10
+ const [friendRooms, setFriendRooms] = useState(true);
11
+ const affiliates = localStorage?.getItem("affiliates");
12
+
8
13
 
9
14
  return {
10
15
  roomID,
@@ -13,6 +18,13 @@ export const useMessagesContext = () => {
13
18
  setUserID,
14
19
  userChatList,
15
20
  setUserChatList,
21
+ courseID,
22
+ setCourseID,
23
+ receiverID,
24
+ setReceiverID,
25
+ friendRooms,
26
+ setFriendRooms,
27
+ affiliates
16
28
  };
17
29
  };
18
30
 
@@ -16,7 +16,7 @@ const useMedia = () => {
16
16
  url: `/media/v1/streams/files`,
17
17
  });
18
18
  } catch (err) {
19
- //console.log(err);
19
+ console.log(err);
20
20
  }
21
21
  };
22
22
 
@@ -35,7 +35,7 @@ const useMedia = () => {
35
35
  url: `/media/v1/streams/files/${id}`,
36
36
  });
37
37
  } catch (err) {
38
- //console.log(err);
38
+ console.log(err);
39
39
  }
40
40
  };
41
41
 
@@ -43,7 +43,7 @@ const useMedia = () => {
43
43
  const [{ ...uploadMediaData }, uploadMedia] = useAxios(
44
44
  {
45
45
  method: "POST",
46
- url: `/media/v1/streams/files/`,
46
+ url: `/media/v1/enterprise/files/`,
47
47
  },
48
48
  {
49
49
  manual: true,
@@ -53,8 +53,8 @@ const useMedia = () => {
53
53
  const handleUploadMedia = async (files) => {
54
54
  try {
55
55
  if (files) {
56
- //console.log(files);
57
- // //console.log("files", files);
56
+ console.log(files);
57
+ // console.log("files", files);
58
58
 
59
59
  // const formdata = new FormData();
60
60
  // formdata.append("upload", files.upload);
@@ -64,7 +64,7 @@ const useMedia = () => {
64
64
  return false;
65
65
  }
66
66
  } catch (err) {
67
- //console.log(err);
67
+ console.log(err);
68
68
  }
69
69
  };
70
70