@@ -7,20 +7,18 @@ import { UnderlineTypes } from '../utils/underlineType';
7
7
8
8
const TechnicalTeam = ( ) => {
9
9
const [ executives , setExecutives ] = useState ( [ ] ) ;
10
- const [ positions , setPositions ] = useState ( [ ] ) ;
10
+ const [ projects , setProjects ] = useState ( [ ] ) ;
11
11
const [ activeTab , setActiveTab ] = useState ( '' ) ;
12
12
13
13
useEffect ( ( ) => {
14
- fetchContent ( 'adminTeamMember ' ) . then ( ( data ) => {
14
+ fetchContent ( 'technicalTeam ' ) . then ( ( data ) => {
15
15
setExecutives ( data ) ;
16
16
17
- const uniquePositions = data
18
- . map ( ( exec ) => exec . position )
19
- . filter ( ( pos , index , self ) => self . indexOf ( pos ) === index ) ;
20
- setPositions ( uniquePositions ) ;
17
+ const uniqueProjects = data . map ( ( exec ) => exec . project ) . filter ( ( pos , index , self ) => self . indexOf ( pos ) === index ) ;
18
+ setProjects ( uniqueProjects ) ;
21
19
22
- if ( uniquePositions . length > 0 ) {
23
- setActiveTab ( uniquePositions [ 0 ] ) ;
20
+ if ( uniqueProjects . length > 0 ) {
21
+ setActiveTab ( uniqueProjects [ 0 ] ) ;
24
22
}
25
23
} ) ;
26
24
} , [ ] ) ;
@@ -31,19 +29,19 @@ const TechnicalTeam = () => {
31
29
< Heading underlineType = { UnderlineTypes . PURPLE_SHORT_UNDERLINE } > Technical Team</ Heading >
32
30
</ div >
33
31
< div >
34
- { positions . length > 0 && (
32
+ { projects . length > 0 && (
35
33
< Tabs value = { activeTab } onChange = { ( val ) => setActiveTab ( val ) } >
36
- < TabsHeader className = "flex justify-items -center" >
37
- { positions . map ( ( position ) => (
38
- < Tab className = "team-tab rounded-full p-1 font-medium" key = { position } value = { position } >
39
- { position }
34
+ < TabsHeader className = "flex flex-row justify -center" >
35
+ { projects . map ( ( project ) => (
36
+ < Tab className = "team-tab rounded-full p-1 font-medium" key = { project } value = { project } >
37
+ { project }
40
38
</ Tab >
41
39
) ) }
42
40
</ TabsHeader >
43
41
< TabsBody >
44
- { positions . map ( ( position ) => (
45
- < TabPanel key = { position } value = { position } >
46
- < Team executives = { executives . filter ( ( exec ) => exec . position === position ) } />
42
+ { projects . map ( ( project ) => (
43
+ < TabPanel key = { project } value = { project } >
44
+ < Team executives = { executives . filter ( ( exec ) => exec . project === project ) } />
47
45
</ TabPanel >
48
46
) ) }
49
47
</ TabsBody >
0 commit comments