We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cacf778 commit 42bcfc6Copy full SHA for 42bcfc6
imgur-client/src/components/main.jsx
@@ -1,11 +1,19 @@
1
var React = require('react');
2
var Header = require('./header');
3
+var TopicList = require('./topic-list');
4
5
module.exports = React.createClass({
6
render: function() {
7
return <div>
8
<Header />
- {this.props.children}
9
+ {this.content()}
10
</div>
11
+ },
12
+ content: function() {
13
+ if(this.props.children) {
14
+ return this.props.children
15
+ } else {
16
+ return <TopicList />
17
+ }
18
}
19
});
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 commit comments