diff --git a/imgur-client/src/actions.jsx b/imgur-client/src/actions.jsx index 3bd24c1..47b2e03 100644 --- a/imgur-client/src/actions.jsx +++ b/imgur-client/src/actions.jsx @@ -2,5 +2,6 @@ var Reflux = require('reflux'); module.exports = Reflux.createActions([ 'getTopics', - 'getImages' + 'getImages', + 'getImage' ]); diff --git a/imgur-client/src/components/image-detail.jsx b/imgur-client/src/components/image-detail.jsx index 39146a4..0812530 100644 --- a/imgur-client/src/components/image-detail.jsx +++ b/imgur-client/src/components/image-detail.jsx @@ -1,19 +1,28 @@ var React = require('react'); var Reflux = require('reflux'); var ImageStore = require('../stores/image-store'); +var Actions = require('../actions'); module.exports = React.createClass({ mixins: [ Reflux.listenTo(ImageStore, 'onChange') ], + getInitialState: function() { + return { + image: null + } + }, + componentWillMount: function() { + Actions.getImage(this.props.params.id); + }, render: function() { return