Skip to content

Commit df1497c

Browse files
seankmccueSean McCuessemtner
authored
Update alumni page with teams from 2024-2025 (#180)
* Add starchess stats to competitions page * Update alumni page to include 24-25 teams --------- Co-authored-by: Sean McCue <skmccue@Seans-MacBook-Pro-3.local> Co-authored-by: Scott Semtner <sjsemtner@gmail.com>
1 parent 23b8bae commit df1497c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/pages/AlumniPage/alumni.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface Person {
1818
}
1919

2020
const sheetYears = [
21+
"24-25",
2122
"23-24",
2223
"22-23",
2324
"21-22",
@@ -30,6 +31,7 @@ const BASE_URL = "https://sheets.googleapis.com/v4/spreadsheets";
3031

3132
const fetchData = async (): Promise<Record<string, Person[]>>=> {
3233
const years: Record<string, Person[]> = {
34+
YR_24_25: [],
3335
YR_23_24: [],
3436
YR_22_23: [],
3537
YR_21_22: [],
@@ -49,6 +51,13 @@ const fetchData = async (): Promise<Record<string, Person[]>>=> {
4951
rows.slice(1).forEach((row: string[]) => {
5052
// Account for different sheet formatting over different years
5153
switch (year) {
54+
case '24-25':
55+
major = row[13]
56+
picture = row[20];
57+
website = row[12];
58+
github = row[10];
59+
linkedin = row[11];
60+
break;
5261
case '23-24':
5362
major = row[13]
5463
picture = row[20];
@@ -104,6 +113,11 @@ const fetchData = async (): Promise<Record<string, Person[]>>=> {
104113

105114
if ((person.team === "AI" || person.team === "ACM AI") && person.name) {
106115
switch (year) {
116+
case '24-25':
117+
if (!years["YR_24_25"].find(element => element.name === person.name)) {
118+
years["YR_24_25"].push(person);
119+
break;
120+
}
107121
case '23-24':
108122
if (!years["YR_23_24"].find(element => element.name === person.name)) {
109123
years["YR_23_24"].push(person);

src/pages/AlumniPage/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ const AlumniPage = () => {
163163
const [isDrawerVisible, setIsDrawerVisible] = useState(false);
164164
const [selectedPerson, setSelectedPerson] = useState<Person>();
165165
const [people, setPeople] = useState<Record<string, Person[]>>({
166+
YR_24_25: [],
166167
YR_23_24: [],
167168
YR_22_23: [],
168169
YR_21_22: [],
@@ -189,6 +190,13 @@ const AlumniPage = () => {
189190
</Content>
190191

191192
<Content className="gallery">
193+
<Section
194+
year='2024-2025'
195+
people={people.YR_24_25}
196+
onSelectPerson={(person: Person) => setSelectedPerson(person)}
197+
showDrawer={() => setIsDrawerVisible(true)}
198+
/>
199+
192200
<Section
193201
year='2023-2024'
194202
people={people.YR_23_24}

0 commit comments

Comments
 (0)