|
3 | 3 | import { generateClient } from "aws-amplify/data";
|
4 | 4 |
|
5 | 5 | import { type Schema } from "@/amplify/data/resource";
|
6 |
| -import ProfileLinks from "@/components/UserProfile/ProfileLinks"; |
7 | 6 | import TeamForm from "@/components/UserProfile/TeamForm";
|
8 | 7 | import { useUser } from "@/components/contexts/UserContext";
|
9 | 8 | import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
@@ -57,67 +56,63 @@ const TeamProfile = () => {
|
57 | 56 | return (
|
58 | 57 | <>
|
59 | 58 | {isFetching ? (
|
60 |
| - <div className="flex h-screen w-full items-center justify-center bg-fuzzy-peach"> |
| 59 | + <div className="flex w-full items-center justify-center bg-fuzzy-peach"> |
61 | 60 | <h1 className="text-2xl">Loading...</h1>
|
62 | 61 | </div>
|
63 | 62 | ) : (
|
64 |
| - <div className="flex w-full flex-col bg-fuzzy-peach"> |
65 |
| - <div className="px-10 md:px-16 md:py-10"> |
66 |
| - <ProfileLinks /> |
67 |
| - <div className=" mb-3 flex justify-between uppercase text-[#FF6B54] md:mx-10"> |
68 |
| - <h1 className="my-4 text-lg font-bold md:mt-3 md:text-2xl"> |
69 |
| - Team Details |
70 |
| - </h1> |
71 |
| - </div> |
72 |
| - {data?.id ? ( |
73 |
| - <> |
74 |
| - <TeamForm data={data} teamMutation={teamMutation} /> |
75 |
| - </> |
76 |
| - ) : ( |
77 |
| - <div> |
78 |
| - <p className="mx-10"> |
79 |
| - Oops, looks like you’re not in a team yet. Are you looking to |
80 |
| - join a team? |
81 |
| - </p> |
82 |
| - <div className={TEAM_INSTRUCTION_STYLES}> |
83 |
| - <h1 className="mb-10 text-3xl font-bold"> |
84 |
| - Looking for a team? |
85 |
| - </h1> |
86 |
| - <ol className="space-y-4 pl-4"> |
87 |
| - <li> |
88 |
| - 1. Join the <strong>Code the Change YYC</strong> Discord |
89 |
| - and navigate to the #looking-for-a-team channel. |
90 |
| - </li> |
91 |
| - <li> |
92 |
| - 2. Reach out to an <strong>existing</strong> team or form |
93 |
| - a new team. |
94 |
| - </li> |
95 |
| - <li> |
96 |
| - 3. After forming a team , assign <strong>ONE</strong>{" "} |
97 |
| - member to “Register New Team” using your Team Name. They |
98 |
| - will receive a unique 6-digit Team ID following |
99 |
| - registration. |
100 |
| - </li> |
101 |
| - <li> |
102 |
| - 4. Next, provide this 6-digit <strong>Team ID</strong> to |
103 |
| - all team members. |
104 |
| - </li> |
105 |
| - <li> |
106 |
| - 5. <strong>EACH</strong> team member <strong>must</strong>{" "} |
107 |
| - navigate to <strong>“Join Existing Team”</strong> to |
108 |
| - submit this ID to officially join the group. |
109 |
| - </li> |
110 |
| - </ol> |
111 |
| - </div> |
112 |
| - <div className="my-6 flex justify-end"> |
113 |
| - <button className={`${BUTTON_STYLES} mx-10 w-full md:w-auto`}> |
114 |
| - <a href="/">Join Team</a> |
115 |
| - </button> |
116 |
| - </div> |
117 |
| - </div> |
118 |
| - )} |
| 63 | + <> |
| 64 | + <div className=" mb-3 flex justify-between uppercase text-[#FF6B54] md:mx-10"> |
| 65 | + <h1 className="my-4 text-lg font-bold md:mt-3 md:text-2xl"> |
| 66 | + Team Details |
| 67 | + </h1> |
119 | 68 | </div>
|
120 |
| - </div> |
| 69 | + {data?.id ? ( |
| 70 | + <> |
| 71 | + <TeamForm data={data} teamMutation={teamMutation} /> |
| 72 | + </> |
| 73 | + ) : ( |
| 74 | + <div> |
| 75 | + <p className="mx-10"> |
| 76 | + Oops, looks like you’re not in a team yet. Are you looking to |
| 77 | + join a team? |
| 78 | + </p> |
| 79 | + <div className={TEAM_INSTRUCTION_STYLES}> |
| 80 | + <h1 className="mb-10 text-3xl font-bold"> |
| 81 | + Looking for a team? |
| 82 | + </h1> |
| 83 | + <ol className="space-y-4 pl-4"> |
| 84 | + <li> |
| 85 | + 1. Join the <strong>Code the Change YYC</strong> Discord and |
| 86 | + navigate to the #looking-for-a-team channel. |
| 87 | + </li> |
| 88 | + <li> |
| 89 | + 2. Reach out to an <strong>existing</strong> team or form a |
| 90 | + new team. |
| 91 | + </li> |
| 92 | + <li> |
| 93 | + 3. After forming a team , assign <strong>ONE</strong> member |
| 94 | + to “Register New Team” using your Team Name. They will |
| 95 | + receive a unique 6-digit Team ID following registration. |
| 96 | + </li> |
| 97 | + <li> |
| 98 | + 4. Next, provide this 6-digit <strong>Team ID</strong> to |
| 99 | + all team members. |
| 100 | + </li> |
| 101 | + <li> |
| 102 | + 5. <strong>EACH</strong> team member <strong>must</strong>{" "} |
| 103 | + navigate to <strong>“Join Existing Team”</strong> to submit |
| 104 | + this ID to officially join the group. |
| 105 | + </li> |
| 106 | + </ol> |
| 107 | + </div> |
| 108 | + <div className="my-6 flex justify-end"> |
| 109 | + <button className={`${BUTTON_STYLES} mx-10 w-full md:w-auto`}> |
| 110 | + <a href="/">Join Team</a> |
| 111 | + </button> |
| 112 | + </div> |
| 113 | + </div> |
| 114 | + )} |
| 115 | + </> |
121 | 116 | )}
|
122 | 117 | </>
|
123 | 118 | );
|
|
0 commit comments