Skip to content

Commit

Permalink
Merge pull request #93 from IEEEUCSC/main
Browse files Browse the repository at this point in the history
Add
  • Loading branch information
Udeesha-Prabhashana authored Feb 4, 2024
2 parents 698727a + 27fb1da commit 34618b2
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Frontend/src/Components/TeamRegistration/TeamRegi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function Registration() {
reset,
} = useForm();
const [isSubmitting, setIsSubmitting] = useState(false);
// const [teamMemberCount, setTeamMemberCount] = useState(2); // Default to 2 members
const [teamMemberCount, setTeamMemberCount] = useState(2); // Default to 2 members
const [teamMembers, setTeamMembers] = useState<any[]>(["member1", "member2"]);

const [slotsRemaining, setSlotsRemaining] = useState(0);
Expand All @@ -31,15 +31,14 @@ export default function Registration() {
setUniversity(watchFields.university);
}, [watchFields]);

// useEffect(() => {
// if (teamMemberCount === 2) {
// setTeamMembers(["member1"]);
// } else if (teamMemberCount === 3) {
// setTeamMembers(["member1", "member2"]);
// }
// }, [teamMemberCount]);
useEffect(() => {
if (teamMemberCount === 2) {
setTeamMembers(["member1" , "member2"]);
} else if (teamMemberCount === 3) {
setTeamMembers(["member1", "member2"]);
}
}, [teamMemberCount]);

setTeamMembers(["member1", "member2"]);

const onSubmit = async (data: any) => {
try {
Expand Down Expand Up @@ -275,13 +274,13 @@ export default function Registration() {
{/* Member */}

<div className="col-md-12">
<label
{/* <label
htmlFor="team-member-count"
className="form-label"
style={{ fontSize: "1.5rem" }}
>
Number of Team Members
</label>
</label> */}
{/* <select
id="team-member-count"
className="form-control"
Expand Down

0 comments on commit 34618b2

Please sign in to comment.