Skip to content

Commit

Permalink
alumni bullet points
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyyvinay authored and justinsheu committed Nov 6, 2024
1 parent 95979eb commit ec9f3ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
17 changes: 12 additions & 5 deletions src/app/team/TeamContent/TeamContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import DropdownMenu from "@/components/DropdownMenu";
import Image from "next/image";
import { useEffect, useState } from "react";

function MemberCard({ memberData, className } : { memberData: any, className?: string }) {
const { name, year, titles } = memberData;
function MemberCard({ memberData, alumni, className } : { memberData: any, alumni: boolean, className?: string }) {
const { name, year, titles, degree, fact, company } = memberData;
const photoURL = memberData?.photo?.fields?.file?.url;
return (
<div className={`group space-y-2 text-center md:text-start ${className}`}>
Expand All @@ -20,7 +20,12 @@ function MemberCard({ memberData, className } : { memberData: any, className?: s
<div className="mx-2 space-y-1">
<h1 className="text-xl md:text-2xl font-bold group-hover:text-blue-400 group-hover:drop-shadow-2xl transition ease-in-out delay-50 duration-300">{name}</h1>
<h1 className="text-md text-neutral-500">{year ? 'CLASS OF ' + year : ''}</h1>
{titles && titles.map((roleName, idx) => <h1 key={idx} className="text-md">{roleName}</h1>)}
<ul>
{titles && titles.map((roleName, idx) => <li key={idx} className="text-md">{'\u2043' + ' '}{roleName}</li>)}
{!alumni && degree && <li className="text-md">{'\u2043'} Major: {degree}</li>}
{!alumni && fact && <li className="text-md">{'\u2043'} Fun Fact: {fact}</li>}
{alumni && company && <li className="text-md">{'\u2043'} Now at: {company}</li>}
</ul>
</div>
</div>
)
Expand Down Expand Up @@ -56,7 +61,7 @@ export default function TeamContent({ members, alumni }: { members: Array<any>,
if (alumniList) {
let newAlumniList: Array<any> = [];
for (const alumniMember of alumni) {
if (alumniRole == "All Roles" || alumniMember.fields.roles.includes(alumniRole)
if (alumniRole == "All Roles" || (alumniMember?.fields?.roles?.includes(alumniRole))
) {
newAlumniList.push(alumniMember);
}
Expand All @@ -68,7 +73,7 @@ export default function TeamContent({ members, alumni }: { members: Array<any>,
return (
<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">
<div className="flex flex-col space-y-8 items-center text-black w-1/2 md:w-1/4 ml-5">
<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
Expand Down Expand Up @@ -98,6 +103,7 @@ export default function TeamContent({ members, alumni }: { members: Array<any>,
return <MemberCard
key={idx}
memberData={memberData}
alumni={false}
/>
}
)}
Expand Down Expand Up @@ -126,6 +132,7 @@ export default function TeamContent({ members, alumni }: { members: Array<any>,
return <MemberCard
key={idx}
memberData={alumniData}
alumni={true}
/>
}
)}
Expand Down
5 changes: 2 additions & 3 deletions src/app/team/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"use client";

"use server";
import Footer from "@/components/Footer";
import Navbar from "@/components/Navbar";
import { getDocsByType } from "@/lib/contentfulLib";
import React, { useState, useEffect } from "react";
import React from "react";
import TeamContent from "./TeamContent/TeamContent";

const ROLES_SORTING = [
Expand Down

0 comments on commit ec9f3ee

Please sign in to comment.