Skip to content

Commit b6886ce

Browse files
committed
Fix profile layout
1 parent 35cf7a1 commit b6886ce

File tree

3 files changed

+63
-60
lines changed

3 files changed

+63
-60
lines changed

src/app/participant/profile/layout.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
"use client";
2+
13
import ProfileHeader from "@/components/UserProfile/ProfileHeader";
4+
import ProfileLinks from "@/components/UserProfile/ProfileLinks";
25

36
const ProfileLayout = ({ children }: { children: React.ReactNode }) => {
47
return (
58
<div className="w-full">
69
<ProfileHeader />
7-
{children}
10+
<div className="flex w-full flex-col bg-fuzzy-peach">
11+
<div className="px-10 md:px-16 md:py-10">
12+
<ProfileLinks />
13+
{children}
14+
</div>
15+
</div>
816
</div>
917
);
1018
};

src/components/UserProfile/TeamProfile.tsx

Lines changed: 53 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { generateClient } from "aws-amplify/data";
44

55
import { type Schema } from "@/amplify/data/resource";
6-
import ProfileLinks from "@/components/UserProfile/ProfileLinks";
76
import TeamForm from "@/components/UserProfile/TeamForm";
87
import { useUser } from "@/components/contexts/UserContext";
98
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
@@ -57,67 +56,63 @@ const TeamProfile = () => {
5756
return (
5857
<>
5958
{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">
6160
<h1 className="text-2xl">Loading...</h1>
6261
</div>
6362
) : (
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>
11968
</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+
</>
121116
)}
122117
</>
123118
);

src/components/UserProfile/UserProfile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const UserProfile = () => {
8080
<div>
8181
{" "}
8282
{isFetching ? (
83-
<div className="flex h-screen w-full items-center justify-center bg-fuzzy-peach">
83+
<div className="flex w-full items-center justify-center bg-fuzzy-peach">
8484
<h1 className="text-2xl">Loading...</h1>
8585
</div>
8686
) : (

0 commit comments

Comments
 (0)