File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export interface Person {
1818}
1919
2020const 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
3132const 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 ) ;
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments