Skip to content

Commit

Permalink
Flux - 10 - Display a List of Topics
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jul 5, 2015
1 parent cacf778 commit 42bcfc6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 9 additions & 1 deletion imgur-client/src/components/main.jsx
@@ -1,11 +1,19 @@
var React = require('react');
var Header = require('./header');
var TopicList = require('./topic-list');

module.exports = React.createClass({
render: function() {
return <div>
<Header />
{this.props.children}
{this.content()}
</div>
},
content: function() {
if(this.props.children) {
return this.props.children
} else {
return <TopicList />
}
}
});
9 changes: 9 additions & 0 deletions imgur-client/src/components/topic-list.jsx
@@ -0,0 +1,9 @@
var React = require('react');

module.exports = React.createClass({
render: function() {
return <div className="list-group">
Topic List
</div>
}
})

0 comments on commit 42bcfc6

Please sign in to comment.