Created
February 2, 2016 00:12
-
-
Save johnferrie/f2098b169124ad9a4ab6 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
import React from 'react'; | |
import { Link } from 'react-router'; | |
class Question extends React.Component { | |
render() { | |
let details = this.props.details; | |
if (details.isPublished) { | |
return ( | |
<li> | |
return ( | |
<Link to={`/analyze/${details.slug}`}> | |
<img src={details.image.thumbnail} /> | |
<h2>{details.question}</h2> | |
</Link> | |
) | |
</li> | |
) | |
} | |
} | |
setQuestion(event) { | |
event.preventDefault(); | |
this.props.selectNewQuestion(this.props.details); | |
} | |
} | |
export default Question; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment