-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathGettingStarted.jsx
284 lines (271 loc) · 11.4 KB
/
GettingStarted.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
import React, { useState, useEffect } from "react";
import { useParams, Link, Navigate } from "react-router-dom";
import styles from "./GettingStarted.module.css";
import Navbar from "../../../Components/Navbar/Navbar";
import Footer from "../../../Components/Footer/Footer";
import InterestGroups from "../Home/data";
import { Box } from "@mui/system";
import Preloader from "../../../Components/Preloader/Preloader";
const GettingStarted = ({ create, wlink, join }) => {
const { id } = useParams();
const [circledata, setCircleData] = useState();
const [redirect, setRedirect] = useState(false);
const [buttontext, setButtonText] = useState("Copy Joining Link");
const [resources, setResources] = useState();
if (!redirect && circledata) {
return (
<>
{redirect && <Navigate to={`/notfound`} replace={true} />}
<Navbar />
<div className={styles.main_container}>
<div className={styles.view_container}>
<div className={styles.view}>
<div className={styles.v_texts}>
{circledata && (
<p className={styles.v_heading}>
<span>{id}</span>
</p>
)}
{create && create.code && (
<p className={styles.v_content}>
Congratulations! Your learning circle has been successfully
created on µLearn. You can now invite others to join your
learning circle, and use µLearn's resources to facilitate
your learning sessions. Make sure to set goals and create a
schedule for your learning sessions, and share resources and
knowledge with other members.
</p>
)}
{join && join.code && (
<p className={styles.v_content}>
Congratulations on joining the learning circle on µLearn!
You can now use our resources to facilitate your learning
sessions and collaborate with other members. Be sure to set
goals, create a schedule, and share resources and knowledge
with the group. Let's work together to achieve our learning
goals!
</p>
)}
{!(create && create.code) && !(join && join.code) && (
<p className={styles.v_content}>
Welcome to the learning circle on µLearn! We're glad to have
you here as we work towards our learning goals together. You
can find resources and connect with other members on our
Discord server as you progress on your learning journey. We
hope you find value in our community and resources as we
strive for success. Let's get started!
</p>
)}
{wlink && wlink.length > 0 && (
<a href={wlink} target="_blank" rel="noopener noreferrer">
<button className={styles.button}>
Join Whatsapp Group
</button>
</a>
)}
{!(wlink && wlink.length > 0) && circledata && (
<a
href={`https://learn.mulearn.org/join/${id}`}
target="_blank"
rel="noopener noreferrer"
>
<button className={styles.button}>
Join Learning Circle
</button>
</a>
)}
</div>
<div className={styles.v_image}>
<img
src="/assets/postcirclecreation/fvimg.gif"
alt=""
className={styles.v_img}
/>
</div>
</div>
</div>
<div className={styles.second_view_container}>
{circledata && (
<div className={styles.steps_view}>
<div className={styles.ssv_texts}>
<p className={styles.ssv_heading}>
<span>Invite</span> Your Peers
</p>
<p className={styles.ssv_content}>
learning circles can be a great way to learn and grow with
others, and can help you stay motivated and accountable as
you work towards your learning goals. So, the first thing
you need to do is invite your friends to join your group.
<br />
<br />
You can share you circle details along with your secret key
to invite your friends.If you have any questions or need
help getting started, don't hesitate to reach out to us.
</p>
</div>
<div>
<div className={styles.circle_details}>
<p className={styles.circle_name}>
<span>Circle Name:</span> {id}
</p>
<p className={styles.circle_interest}>
<span>Interest Group: </span>
{circledata.interest}
</p>
{create && create.passcode && (
<p className={styles.circle_team_pass}>
<span>Team Passcode: </span> {create.passcode}
</p>
)}
<p className={styles.circle_lead}>
<span>Team Lead:</span> {circledata.members[0]}
</p>
<p className={styles.circle_college}>
<span>College Name:</span> {circledata.college.name}
</p>
{circledata.meet_place !== "No Data" && (
<p className={styles.circle_college}>
<span>Meet Place</span> {circledata.meet_place}
</p>
)}
{circledata.meet_time !== "No Data" && (
<p className={styles.circle_college}>
<span>Meet Time:</span> {circledata.meet_time}
</p>
)}
<button
onClick={() => {
navigator.clipboard.writeText(
`https://learn.mulearn.org/join/${id}`
);
setButtonText("Link Copied");
}}
className={styles.button}
>
{buttontext}
</button>
</div>
</div>
</div>
)}
{wlink && wlink.length > 0 && (
<div className={styles.steps_view}>
<div className={styles.v_image}>
<img
src="/assets/postcirclecreation/communcation.gif"
alt=""
className={styles.v2_img}
/>
</div>
<div className={styles.ssv_texts}>
<p className={styles.ssv_heading}>
Join <span>Whatsapp Group</span>
</p>
<p className={styles.ssv_content}>
To stay connected and receive updates, we encourage you to
join our WhatsApp group. Simply click on the link provided
below to be added to the group.
<br />
<br />
We look forward to seeing you in the group and engaging in
meaningful discussions and learning opportunities.
</p>
<a href={wlink} target="_blank" rel="noopener noreferrer">
<button className={styles.button}>
Join Whatsapp Group
</button>
</a>
</div>
</div>
)}
{resources && resources[0] && (
<div className={styles.steps_viewss}>
<div className={styles.reverse}>
<div className={styles.ssv_texts}>
<p className={styles.ssv_heading}>
Start <span>Learning</span>
</p>
<p className={styles.ssv_content}>
Check out the free learning resources for your interest
group and start learning them with your circle! There is a
wide range of courses available, from basics to advanced,
and it's a great way to gain new knowledge, skills and
karma points with the support of your peers.
<br />
<br />
Join in on the regularly scheduled office hours at the
mulearn discord server if you have any questions or need
mentor help.
</p>
{circledata && (
<Link to={`/${circledata.interest}`}>
<button className={styles.button}>
Checkout Resources
</button>
</Link>
)}
</div>
<div className={styles.v_image}>
<img
src="/assets/postcirclecreation/learning.gif"
alt=""
className={styles.v3_img}
/>
</div>
</div>
</div>
)}
<div className={styles.steps_view}>
<div className={styles.v_image}>
<img
src="/assets/postcirclecreation/discord.gif"
alt=""
className={styles.v3_img}
/>
</div>
<div className={styles.ssv_texts}>
<p className={styles.ssv_heading}>
Join <span>Discord Server</span>
</p>
<p className={styles.ssv_content}>
Welcome to µLearn! Join our Discord server to participate in
events like the Inspiration Station Radio and Salt Mango Tree,
connect with others, and earn karma points. We're a community
of learners looking to support and grow with one another. We
hope to see you there!
</p>
<a
href="https://app.mulearn.org/user/register"
target="_blank"
rel="noopener noreferrer"
>
<button className={styles.button}>Join Discord Server</button>
</a>
</div>
</div>
</div>
</div>
<Footer />
</>
);
} else {
return (
<>
{redirect && circledata && <Navigate to={`/notfound`} replace={true} />}
<Box
sx={{
display: "flex",
flexDirection: "column",
minHeight: "100vh",
justifyContent: "center",
alignItems: "center",
zIndex: "1000",
}}
>
<Preloader />
</Box>
</>
);
}
};
export default GettingStarted;