Skip to content

Instantly share code, notes, and snippets.

@johnferrie
Created February 2, 2016 00:12
Show Gist options
  • Save johnferrie/f2098b169124ad9a4ab6 to your computer and use it in GitHub Desktop.
Save johnferrie/f2098b169124ad9a4ab6 to your computer and use it in GitHub Desktop.
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