Skip to content

148 team page alumni section #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d2c6821
add favicon and page title
andersontruong Oct 11, 2023
fabc28c
separated about and projects sections into components
andersontruong Oct 11, 2023
8e2d2d3
moved layout and globals.css to root
andersontruong Oct 11, 2023
65751c5
blank about page
andersontruong Oct 11, 2023
f325b90
create ContentSection component, add public media, update layout
andersontruong Oct 30, 2023
0235da6
Add lib folder with contentful functions
elizabethkim11 Oct 27, 2023
948e336
Update env var names in lib scripts
elizabethkim11 Oct 31, 2023
feaef74
Add teampage files and connect to frontend w api
elizabethkim11 Oct 31, 2023
3801f03
redirect to teampage with navbar
elizabethkim11 Oct 31, 2023
ded0158
responsive column nums
elizabethkim11 Nov 12, 2023
1bfab1a
responsive columns for alumni
elizabethkim11 Nov 12, 2023
6a4287a
Squashed commit of the following:
andersontruong Nov 18, 2023
576f7a1
Add teampage
andersontruong Dec 5, 2023
5d93f12
update roles
andersontruong Dec 5, 2023
0af9d0c
add join page
andersontruong Dec 5, 2023
57a7451
fix homepage splash padding
andersontruong Dec 5, 2023
7bbc2b7
update homepage
andersontruong Dec 20, 2023
e26b1cf
semi-finished
andersontruong Mar 1, 2024
bf9d931
remove old teampage
andersontruong Mar 1, 2024
f40ea7e
responsive join
andersontruong Mar 1, 2024
a503486
fix marketing card size
andersontruong Mar 1, 2024
8057658
Added the alumni section + connected Alumni content model
keyanadesai Oct 17, 2024
5081ef6
Create yarn.lock
keyanadesai Oct 18, 2024
1060488
Added Alumni section
keyanadesai Oct 21, 2024
37c31cc
add favicon and page title
andersontruong Oct 11, 2023
6dc0056
separated about and projects sections into components
andersontruong Oct 11, 2023
ec55e92
moved layout and globals.css to root
andersontruong Oct 11, 2023
187950d
blank about page
andersontruong Oct 11, 2023
1af655e
create ContentSection component, add public media, update layout
andersontruong Oct 30, 2023
6b724a1
Add lib folder with contentful functions
elizabethkim11 Oct 27, 2023
37c9f34
Update env var names in lib scripts
elizabethkim11 Oct 31, 2023
b623248
Add teampage files and connect to frontend w api
elizabethkim11 Oct 31, 2023
8d28827
redirect to teampage with navbar
elizabethkim11 Oct 31, 2023
7ff1da2
responsive column nums
elizabethkim11 Nov 12, 2023
af4bef3
responsive columns for alumni
elizabethkim11 Nov 12, 2023
60c7442
Squashed commit of the following:
andersontruong Nov 18, 2023
b5ebbeb
Add teampage
andersontruong Dec 5, 2023
8a8d183
add join page
andersontruong Dec 5, 2023
5fb924c
fix homepage splash padding
andersontruong Dec 5, 2023
2a084b8
update homepage
andersontruong Dec 20, 2023
d3ff1cd
semi-finished
andersontruong Mar 1, 2024
0c2ccde
remove old teampage
andersontruong Mar 1, 2024
eec7e6a
responsive join
andersontruong Mar 1, 2024
bb10b60
fix marketing card size
andersontruong Mar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 82 additions & 39 deletions src/app/team/TeamContent/TeamContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ function MemberCard({ memberData, className } : { memberData: any, className?: s
)
}

export default function TeamContent({ members }: { members: Array<any> }) {
export default function TeamContent({ members, alumni }: { members: Array<any>, alumni: Array<any> }) {
const [membersList, setMembersList] = useState<Array<any>|undefined>(undefined);
const [alumniList, setAlumniList] = useState<Array<any>|undefined>(undefined);
const [year, setYear] = useState<string>("All Years");
const [role, setRole] = useState<string>("All Roles");
const [alumniRole, setAlumniRole] = useState<string>("All Roles");

useEffect(() => {
setMembersList(members);
}, [members]);

setAlumniList(alumni);
}, [members, alumni]);

useEffect(() => {
if (membersList) {
let newMembersList: Array<any> = [];
Expand All @@ -49,45 +52,85 @@ export default function TeamContent({ members }: { members: Array<any> }) {
}
}, [year, role]);

useEffect(() => {
if (alumniList) {
let newAlumniList: Array<any> = [];
for (const alumniMember of alumni) {
if (alumniRole == "All Roles" || alumniMember.fields.roles.includes(alumniRole)
) {
newAlumniList.push(alumniMember);
}
}
setAlumniList(newAlumniList);
}
}, [alumniRole]);

return (
<div className="flex flex-col items-center lg:items-start lg:flex-row w-full my-12 text-black">
<div className="flex flex-col space-y-8 items-center text-black w-1/2 md:w-1/4">
<h1 className="text-4xl font-bold">THE TEAM</h1>
<div className="flex flex-col space-y-4 md:space-y-0 md:flex-row md:space-x-8 lg:space-x-0 lg:flex-col lg:space-y-2">
<DropdownMenu
className="flex flex-col w-[200px] text-xl"
buttonClassName="p-4 px-4 bg-white border border-gray-300 border-[1.5px] focus:border-blue-300"
menuClassName="w-[200px] bg-white mt-1 text-center drop-shadow-md"
menuButtonClassName="py-2 hover:bg-blue-200 border border-[1.5px] border-b-0 border-gray"
menuButtonHoverColor="bg-blue-100"
options={["All Years", "2024", "2025", "2026", "2027"]}
setValue={setYear}
/>
<DropdownMenu
className="flex flex-col w-[200px] text-xl"
buttonClassName="p-4 px-4 bg-white border border-gray-300 border-[1.5px] focus:border-blue-300"
menuClassName="w-[200px] bg-white mt-1 text-center drop-shadow-md"
menuButtonClassName="py-2 hover:bg-blue-200 border border-[1.5px] border-b-0 border-gray"
menuButtonHoverColor="bg-blue-100"
options={["All Roles", "President", "Director", "Design", "Marketing/External", "Projects", "Finance", "Tech"]}
setValue={setRole}
/>
<div className="flex flex-col items-center w-full my-12 text-black">
<div className="flex flex-col items-center lg:items-start lg:flex-row w-full my-12 text-black">
<div className="flex flex-col space-y-8 items-center text-black w-1/2 md:w-1/4">
<h1 className="text-4xl font-bold">THE TEAM</h1>
<div className="flex flex-col space-y-4 md:space-y-0 md:flex-row md:space-x-8 lg:space-x-0 lg:flex-col lg:space-y-2">
<DropdownMenu
className="flex flex-col w-[200px] text-xl"
buttonClassName="p-4 px-4 bg-white border border-gray-300 border-[1.5px] focus:border-blue-300"
menuClassName="w-[200px] bg-white mt-1 text-center drop-shadow-md"
menuButtonClassName="py-2 hover:bg-blue-200 border border-[1.5px] border-b-0 border-gray"
menuButtonHoverColor="bg-blue-100"
options={["All Years", "2024", "2025", "2026", "2027"]}
setValue={setYear}
/>
<DropdownMenu
className="flex flex-col w-[200px] text-xl"
buttonClassName="p-4 px-4 bg-white border border-gray-300 border-[1.5px] focus:border-blue-300"
menuClassName="w-[200px] bg-white mt-1 text-center drop-shadow-md"
menuButtonClassName="py-2 hover:bg-blue-200 border border-[1.5px] border-b-0 border-gray"
menuButtonHoverColor="bg-blue-100"
options={["All Roles", "President", "Director", "Design", "Marketing/External", "Projects", "Finance", "Tech"]}
setValue={setRole}
/>
</div>
</div>
<div className="p-12 grid gap-12 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 md:gap-8 lg:gap-12 xl:gap-16">
{ membersList?.filter((data) => data.enabled).map((data, idx) =>
{
const memberData = data.fields;
return <MemberCard
key={idx}
memberData={memberData}
/>
}
)}
</div>
</div>
</div>
<div className="p-12 grid gap-12 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 md:gap-8 lg:gap-12 xl:gap-16">
{ membersList?.filter((data) => data.enabled).map((data, idx) =>
{
const memberData = data.fields;
return <MemberCard
key={idx}
memberData={memberData}
/>
}
)}
</div>
<div>

<div className="flex flex-col items-center lg:items-start lg:flex-row w-full my-12 text-black">
<div className="flex flex-col space-y-8 items-center text-black w-1/2 md:w-1/4">
<h1 className="text-4xl font-bold">ALUMNI</h1>
<div className="flex flex-col space-y-4 md:space-y-0 md:flex-row md:space-x-8 lg:space-x-0 lg:flex-col lg:space-y-2">
<DropdownMenu
className="flex flex-col w-[200px] text-xl"
buttonClassName="p-4 px-4 bg-white border border-gray-300 border-[1.5px] focus:border-blue-300"
menuClassName="w-[200px] bg-white mt-1 text-center drop-shadow-md"
menuButtonClassName="py-2 hover:bg-blue-200 border border-[1.5px] border-b-0 border-gray"
menuButtonHoverColor="bg-blue-100"
options={["All Roles", "President", "Director", "Design", "Marketing/External", "Projects", "Finance", "Tech"]}
setValue={setAlumniRole}
/>
</div>
</div>
<div className="p-12 grid gap-12 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 md:gap-8 lg:gap-12 xl:gap-16">
{ alumniList?.filter((data) => data.enabled).map((data, idx) =>
{
const alumniData = data.fields;
return <MemberCard
key={idx}
memberData={alumniData}
/>
}
)}
</div>
</div>
</div>
</div>
)
}
9 changes: 8 additions & 1 deletion src/app/team/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,17 @@ export default async function Team() {
return docs;
});

const alumni = await getDocsByType('alumni')
.then(docs => {
docs.sort(memberSort);
docs = docs.map(obj => ({...obj, enabled: true}));
return docs;
});

return (
<main className="flex min-h-screen flex-col">
<Navbar />
<TeamContent members={members} />
<TeamContent members={members} alumni={alumni}/>
<Footer />
</main>
);
Expand Down
Loading
Loading