Created
November 23, 2015 23:09
-
-
Save anomaly44/98d57c59b709e5543798 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by rob on 11/18/15. | |
*/ | |
import React, {Component, PropTypes } from 'react'; | |
export default class ReportItem extends Component { | |
static propTypes = { | |
entry: PropTypes.object.isRequired | |
} | |
getImagePath() { | |
const entry = this.props.entry; | |
return '/problems/' + entry.image; | |
} | |
render() { | |
const entry = this.props.entry; | |
return (<div key={entry.id}> | |
<h4>{entry.name}</h4> | |
<img src={this.getImagePath()}></img> | |
</div>); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment