11import React , { Component } from 'react'
2+ import PropTypes from 'prop-types'
23import { Link } from 'react-router'
34import { List } from 'immutable'
45
@@ -8,38 +9,38 @@ class Corpora extends Component {
89 < div className = { this . props . className } >
910 < h1 > Corpora</ h1 >
1011 {
11- this . props . corpora . map ( ( connection ) => {
12- let website = connection . get ( 'website' ) || ''
13- if ( connection . get ( 'searchKeywords' ) ) {
14- website = `${ website } /search/${ connection . get ( 'searchKeywords' ) } `
15- } else {
16- website = `${ website } /search`
17- }
18- return (
19- < div className = 'media' key = { connection . get ( 'dbname' ) } >
20- < Link to = { website } className = 'pull-left' >
21- < img src = { 'https://secure.gravatar.com/avatar/' + connection . get ( 'gravatar' ) + '.jpg?s=96&d=retro&r=pg' } alt = 'Corpus image' className = 'media-object' />
22- </ Link >
23- < div className = 'media-body' >
24- < h4 className = 'media-heading' >
25- < Link to = { website } >
26- { connection . get ( 'title' ) }
12+ this . props . corpora . map ( ( connection ) => {
13+ let website = connection . get ( 'website' ) || ''
14+ if ( connection . get ( 'searchKeywords' ) ) {
15+ website = `${ website } /search/${ connection . get ( 'searchKeywords' ) } `
16+ } else {
17+ website = `${ website } /search`
18+ }
19+ return (
20+ < div className = 'media' key = { connection . get ( 'dbname' ) } >
21+ < Link to = { website } className = 'pull-left' >
22+ < img src = { 'https://secure.gravatar.com/avatar/' + connection . get ( 'gravatar' ) + '.jpg?s=96&d=retro&r=pg' } alt = 'Corpus image' className = 'media-object' />
2723 </ Link >
28- </ h4 >
29- < p > { connection . get ( 'description' ) } </ p >
30- </ div >
31- </ div >
32- )
33- } )
34- }
24+ < div className = 'media-body' >
25+ < h4 className = 'media-heading' >
26+ < Link to = { website } >
27+ { connection . get ( 'title' ) }
28+ </ Link >
29+ </ h4 >
30+ < p > { connection . get ( 'description' ) } </ p >
31+ </ div >
32+ </ div >
33+ )
34+ } )
35+ }
3536 </ div >
3637 )
3738 }
3839}
3940
4041Corpora . propTypes = {
41- corpora : React . PropTypes . instanceOf ( List ) . isRequired ,
42- className : React . PropTypes . string . isRequired
42+ corpora : PropTypes . instanceOf ( List ) . isRequired ,
43+ className : PropTypes . string . isRequired
4344}
4445
4546export default Corpora
0 commit comments