Skip to content

Commit

Permalink
Merge pull request #183 from SpaceyaTech/discordredirect
Browse files Browse the repository at this point in the history
Discordredirect
  • Loading branch information
sonylomo authored Jun 11, 2024
2 parents e42cbd3 + b3e06d5 commit 0455044
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 108 deletions.
111 changes: 3 additions & 108 deletions src/APP/pages/community/sections/JoinSYTForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import toast from "react-hot-toast";
import { LazyLoadImage } from "react-lazy-load-image-component";

import { sytLogoGreen } from "../../../../assets/images/icons";
import JoinSytSelectFields from "./JoinSYTSelectFields";
function JoinSYTForm({ closeModal }) {
const [loading, setLoading] = useState(false);
const [err, setErr] = useState("");
Expand All @@ -30,8 +31,8 @@ function JoinSYTForm({ closeModal }) {
});

setLoading(false);
toast.success("Welcome to SpaceYaTech Community!");
closeModal();
window.location.href = "https://discord.com/invite/xSH9eAgBJm";
} catch (error) {
setErr(error.response.data.detail);
setLoading(true);
Expand Down Expand Up @@ -80,113 +81,7 @@ function JoinSYTForm({ closeModal }) {
/>
</label>

<label
htmlFor="work"
className="text-sm font-medium flex flex-col gap-1.5"
>
What would best describe your work?
<select
name="work"
id="work"
required
className="px-3 py-2.5 outline-none border rounded-md text-sm"
>
<option value="Artificial Intelligence">
Artificial Intelligence
</option>
<option value="Blockchain">Blockchain</option>
<option value="Web Development">Web Development</option>
<option value="Mobile Development">Mobile Development</option>
<option value="Cloud Computing">Cloud Computing</option>
<option value="Cyber Security">Cyber Security</option>
<option value="Data Analysis">Data Analysis</option>
<option value="Database Management">Database Management</option>
<option value="Machine Learning">Machine Learning</option>
<option value="Natural Language Processing">
Natural Language Processing
</option>
<option value="Neural Networks">Neural Networks</option>
<option value="Software Engineering">Software Engineering</option>
<option value="System Administration">
System Administration
</option>
<option value="Robotics">Robotics</option>
<option value="Augmented Reality">Augmented Reality</option>
<option value="Virtual Reality">Virtual Reality</option>
<option value="Game Development">Game Development</option>
<option value="Internet of Things">
Internet of Things(IoT)
</option>
<option value="Graphic Design">Graphic Design</option>

<option value="UI/UX Design">UI/UX Design</option>
<option value="Networking">Networking</option>
<option value="Operating Systems">Operating Systems</option>
<option value="Quantum Computing">Quantum Computing</option>
<option value="DevOps">DevOps</option>
<option value="Frontend Development">Frontend Development</option>
<option value="Backend Development">Backend Development</option>
<option value="Full Stack Development">
Full Stack Development
</option>
<option value="Embedded Systems">Embedded Systems</option>
<option value="Big Data">Big Data</option>
</select>
</label>

<label
htmlFor="field_of_interest"
className="text-sm font-medium flex flex-col gap-1.5"
>
What would best describe your interest?
<select
name="field_of_interest"
id="field_of_interest"
required
className="px-3 py-2.5 outline-none border rounded-md text-sm"
>
<option value="Artificial Intelligence">
Artificial Intelligence
</option>
<option value="Blockchain">Blockchain</option>
<option value="Web Development">Web Development</option>
<option value="Mobile Development">Mobile Development</option>
<option value="Cloud Computing">Cloud Computing</option>
<option value="Cyber Security">Cyber Security</option>
<option value="Data Analysis">Data Analysis</option>
<option value="Database Management">Database Management</option>
<option value="Machine Learning">Machine Learning</option>
<option value="Natural Language Processing">
Natural Language Processing
</option>
<option value="Neural Networks">Neural Networks</option>
<option value="Software Engineering">Software Engineering</option>
<option value="System Administration">
System Administration
</option>
<option value="Robotics">Robotics</option>
<option value="Augmented Reality">Augmented Reality</option>
<option value="Virtual Reality">Virtual Reality</option>
<option value="Game Development">Game Development</option>
<option value="Internet of Things">
Internet of Things(IoT)
</option>
<option value="Graphic Design">Graphic Design</option>

<option value="UI/UX Design">UI/UX Design</option>
<option value="Networking">Networking</option>
<option value="Operating Systems">Operating Systems</option>
<option value="Quantum Computing">Quantum Computing</option>
<option value="DevOps">DevOps</option>
<option value="Frontend Development">Frontend Development</option>
<option value="Backend Development">Backend Development</option>
<option value="Full Stack Development">
Full Stack Development
</option>
<option value="Embedded Systems">Embedded Systems</option>
<option value="Big Data">Big Data</option>
</select>
</label>
<JoinSytSelectFields />

<button
type="submit"
Expand Down
76 changes: 76 additions & 0 deletions src/APP/pages/community/sections/JoinSYTSelectFields.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
const options = [
"Artificial Intelligence",
"Blockchain",
"Web Development",
"Mobile Development",
"Cloud Computing",
"Cyber Security",
"Data Analysis",
"Database Management",
"Machine Learning",
"Natural Language Processing",
"Neural Networks",
"Software Engineering",
"System Administration",
"Robotics",
"Augmented Reality",
"Virtual Reality",
"Game Development",
"Internet of Things",
"Graphic Design",
"UI/UX Design",
"Networking",
"Operating Systems",
"Quantum Computing",
"DevOps",
"Frontend Development",
"Backend Development",
"Full Stack Development",
"Embedded Systems",
"Big Data",
];

const selectFields = [
{
label: "What would best describe your work?",
id: "work",
name: "work",
options,
},
{
label: "What would best describe your interest?",
id: "field_of_interest",
name: "field_of_interest",
options,
},
];

const JoinSytSelectFields = () => {
return (
<>
{selectFields.map((field) => (
<label
key={field.id}
htmlFor={field.id}
className="text-sm font-medium flex flex-col gap-1.5"
>
{field.label}
<select
name={field.name}
id={field.id}
required
className="px-3 py-2.5 outline-none border rounded-md text-sm"
>
{field.options.map((option) => (
<option key={option} value={option}>
{option}
</option>
))}
</select>
</label>
))}
</>
);
};

export default JoinSytSelectFields;

0 comments on commit 0455044

Please sign in to comment.