File tree Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -16,21 +16,16 @@ const links = [
16
16
{ section : 'spec' , text : 'Spec' , href : 'http://facebook.github.io/graphql/' } ,
17
17
] ;
18
18
19
- var HeaderLinks = React . createClass ( {
20
- render : function ( ) {
21
- return < nav >
22
- { links . map ( link =>
23
- < a
24
- key = { link . section }
25
- href = { link . href }
26
- target = { link . href . slice ( 0 , 4 ) === 'http' ? '_blank' : null }
27
- rel = { link . href . slice ( 0 , 4 ) === 'http' ? 'noopener noreferrer' : null }
28
- className = { link . section === this . props . section ? 'active' : null } >
29
- { link . text }
30
- </ a >
31
- ) }
32
- </ nav > ;
33
- }
34
- } ) ;
35
-
36
- module . exports = HeaderLinks ;
19
+ export default ( { section } ) =>
20
+ < nav >
21
+ { links . map ( link =>
22
+ < a
23
+ key = { link . section }
24
+ href = { link . href }
25
+ target = { link . href . slice ( 0 , 4 ) === 'http' ? '_blank' : null }
26
+ rel = { link . href . slice ( 0 , 4 ) === 'http' ? 'noopener noreferrer' : null }
27
+ className = { link . section === section ? 'active' : null } >
28
+ { link . text }
29
+ </ a >
30
+ ) }
31
+ </ nav >
You can’t perform that action at this time.
0 commit comments