Skip to content

Commit cf49901

Browse files
Hmt 99/login redirect (#169)
Co-authored-by: Burton Jong <[email protected]>
1 parent 1d30e43 commit cf49901

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

src/app/participant/team-selection/CreateTeamPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ const CreateTeamPage = () => {
8585
<li>
8686
After forming a team, assign <b>ONE</b> member to{" "}
8787
<b>&quot;Register New Team&quot;</b> using your Team Name.
88-
They will receive a unique <b>6-digit Team ID</b>{" "}
88+
They will receive a unique <b>4-digit Team ID</b>{" "}
8989
following registration.
9090
</li>
9191
<li className={CREATE_TEAM_STEPS_STYLES}>
92-
Next, provide this <b>6-digit Team ID</b> to all team
92+
Next, provide this <b>4-digit Team ID</b> to all team
9393
members.
9494
</li>
9595
<li className={CREATE_TEAM_STEPS_STYLES}>

src/components/LoginForm/PersonalFormFields.tsx

+12
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ export default function PersonalFormFields({ user }: { user: AuthUser }) {
9797
if (isError) {
9898
return <div>Error, please try again later.</div>;
9999
}
100+
if (data?.teamId && data?.completedRegistration) {
101+
if (data?.role === UserType.Admin) {
102+
router.push("/admin");
103+
return null;
104+
} else if (data?.role === UserType.Judge) {
105+
router.push("/judging");
106+
return null;
107+
} else {
108+
router.push("/participant/profile");
109+
return null;
110+
}
111+
}
100112
if (data?.teamId) {
101113
router.push(`/register/team/${data.teamId}`);
102114
return null;

src/components/UserProfile/TeamProfile.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ const TeamProfile = () => {
8989
<li>
9090
3. After forming a team , assign <strong>ONE</strong> member
9191
to “Register New Team” using your Team Name. They will
92-
receive a unique 6-digit Team ID following registration.
92+
receive a unique 4-digit Team ID following registration.
9393
</li>
9494
<li>
95-
4. Next, provide this 6-digit <strong>Team ID</strong> to
95+
4. Next, provide this 4-digit <strong>Team ID</strong> to
9696
all team members.
9797
</li>
9898
<li>

src/components/teamRegistration/JoinTeamInstructions.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ export default function JoinTeamInstructions() {
2121
<span className="font-bold"> ONE </span>
2222
member to <span className="font-bold"> “Register New Team” </span>
2323
using your Team Name. They will receive a unique
24-
<span className="font-bold"> 6-digit Team ID </span>
24+
<span className="font-bold"> 4-digit Team ID </span>
2525
following registration.
2626
</li>
2727
<li>
2828
Next, provide this
29-
<span className="font-bold"> 6-digit Team ID </span>
29+
<span className="font-bold"> 4-digit Team ID </span>
3030
to all team members.
3131
</li>
3232
<li>

0 commit comments

Comments
 (0)