1
- import React from 'react' ;
1
+ import React , { useEffect } from 'react' ;
2
2
import Layout from '@theme/Layout' ;
3
3
import useDocusaurusContext from '@docusaurus/useDocusaurusContext' ;
4
4
import Avatar from '../components/avatar' ;
5
5
import Testimonials from './testimonials' ;
6
6
import ReactPlayer from 'react-player' ;
7
+ import axios from 'axios' ;
7
8
8
9
/**
9
10
* Home page component
@@ -14,6 +15,13 @@ function Home() {
14
15
const { siteConfig = { } } = context ;
15
16
16
17
const [ showDemo , setShowDemo ] = React . useState ( false ) ;
18
+ const [ contributors , setContributors ] = React . useState ( [ ] ) ;
19
+
20
+ useEffect ( ( ) => {
21
+ axios . get ( 'https://api.github.com/repos/finos/git-proxy/contributors' ) . then ( ( res ) => {
22
+ setContributors ( res . data ) ;
23
+ } ) ;
24
+ } , [ ] ) ;
17
25
18
26
return (
19
27
< Layout title = { `${ siteConfig . title } ` } description = { `${ siteConfig . tagline } ` } >
@@ -132,8 +140,25 @@ function Home() {
132
140
) }
133
141
</ div >
134
142
</ div >
143
+ < Testimonials />
135
144
< div className = 'container text--center margin-top--xl' >
136
- < h1 className = 'margin-top--md' > Meet the Team 👋</ h1 >
145
+ < h1 className = 'margin-top--md' >
146
+ Our{ ' ' }
147
+ < span
148
+ style = { {
149
+ color : 'purple' ,
150
+ border : '2px solid purple' ,
151
+ paddingTop : '5px' ,
152
+ paddingBottom : '5px' ,
153
+ paddingLeft : '10px' ,
154
+ paddingRight : '10px' ,
155
+ borderRadius : '30px' ,
156
+ backgroundColor : 'rgba(90, 34, 139, 0.1)' ,
157
+ } }
158
+ >
159
+ Maintainers
160
+ </ span >
161
+ </ h1 >
137
162
< div className = 'row margin-top--xl margin-bottom--xl' >
138
163
< div className = 'col col--4' >
139
164
< div className = 'col-demo' >
@@ -178,7 +203,41 @@ function Home() {
178
203
</ div >
179
204
</ div >
180
205
</ div >
181
- < Testimonials />
206
+ < div className = 'container text--center' >
207
+ < h1 className = 'margin-top--md' >
208
+ Our{ ' ' }
209
+ < span
210
+ style = { {
211
+ color : '#30d5c8' ,
212
+ border : '2px solid #30d5c8' ,
213
+ paddingTop : '5px' ,
214
+ paddingBottom : '5px' ,
215
+ paddingLeft : '10px' ,
216
+ paddingRight : '10px' ,
217
+ borderRadius : '30px' ,
218
+ backgroundColor : 'rgba(48, 213, 200, 0.1)' ,
219
+ } }
220
+ >
221
+ Contributors
222
+ </ span >
223
+ </ h1 >
224
+ < div className = 'row margin-top--xl margin-bottom--xl' >
225
+ { contributors . map ( ( contributor ) => {
226
+ if ( ! [ 29139614 , 49699333 ] . includes ( contributor . id ) )
227
+ return (
228
+ < div key = { contributor . id } className = 'col col--4' >
229
+ < div className = 'col-demo' >
230
+ < Avatar
231
+ name = { contributor . login }
232
+ description = { `${ contributor . contributions } ${ contributor . contributions > 1 ? 'contributions' : 'contribution' } ` }
233
+ username = { contributor . login }
234
+ />
235
+ </ div >
236
+ </ div >
237
+ ) ;
238
+ } ) }
239
+ </ div >
240
+ </ div >
182
241
</ Layout >
183
242
) ;
184
243
}
0 commit comments