@@ -5,13 +5,21 @@ import { useState } from "react";
5
5
import PortfolioDisplay from "@/components/About/PortfolioDisplay" ;
6
6
import ExecDisplay from "@/components/About/ExecDisplay" ;
7
7
8
+ // Need to import more data
9
+ import { teamData as data2020 } from "@/../public/data/years/2020" ;
10
+
8
11
const MIN_YEAR = 2007 ;
9
12
const MAX_YEAR = 2020 ;
10
13
const DEFAULT_YEAR = 2020 ;
11
14
15
+ const TEAM_DATA_BY_YEAR : Record < number , { execs : Exec [ ] , portfolios : PortfolioData [ ] } > = {
16
+ 2020 : data2020 ,
17
+ } ;
18
+
12
19
const OurHistoryPage = ( ) => {
13
20
const [ year , setYear ] = useState ( DEFAULT_YEAR ) ;
14
21
const [ shouldDisplayTip , setShouldDisplayTip ] = useState ( true ) ;
22
+ const currentTeam = TEAM_DATA_BY_YEAR [ year ] ;
15
23
16
24
return (
17
25
< Layout >
@@ -71,14 +79,18 @@ const OurHistoryPage = () => {
71
79
< p className = "mt-5" > Use the slider to see the teams from past years!</ p >
72
80
) }
73
81
74
- < div className = "pt-6" >
75
- < ExecDisplay />
76
- </ div >
77
- < div className = "space-y-6 w-full" >
78
- < div className = "border-t border-gray-300 my-10" > </ div >
79
- < h2 className = "text-xl font-semibold mb-2" > Directors</ h2 >
80
- < PortfolioDisplay />
81
- </ div >
82
+ { currentTeam && (
83
+ < >
84
+ < div className = "pt-6 w-full" >
85
+ < ExecDisplay execs = { currentTeam . execs } />
86
+ </ div >
87
+ < div className = "space-y-6 w-full" >
88
+ < div className = "border-t border-gray-300 my-10" > </ div >
89
+ < h2 className = "text-xl font-semibold mb-2" > Directors</ h2 >
90
+ < PortfolioDisplay portfolios = { currentTeam . portfolios } />
91
+ </ div >
92
+ </ >
93
+ ) }
82
94
83
95
</ div >
84
96
</ PageBody >
0 commit comments