Skip to content

Commit

Permalink
remove 'Data' suffix from state keys too.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed May 27, 2015
1 parent 5152a87 commit 86fb847
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pages/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ var BlogSection = React.createClass({
},
getInitialState: function() {
return {
featuredPostData: {
featuredPost: {
title: "",
author: "",
publishedDate: "",
contentSnippet: "",
link: ""
},
latestPostsData: []
latestPosts: []
}
},
componentDidMount: function() {
Expand All @@ -110,8 +110,8 @@ var BlogSection = React.createClass({
return;
}
this.setState({
featuredPostData: data.featuredPosts,
latestPostsData: data.latestPosts
featuredPost: data.featuredPosts,
latestPosts: data.latestPosts
});
}.bind(this));
},
Expand All @@ -125,10 +125,10 @@ var BlogSection = React.createClass({
</div>
<div className="row">
<div className="col-sm-8 col-md-8 col-lg-8">
<FeaturedPost data={this.state.featuredPostData} />
<FeaturedPost data={this.state.featuredPost} />
</div>
<div className="col-sm-4 col-md-4 col-lg-4">
<LatestPosts data={this.state.latestPostsData} />
<LatestPosts data={this.state.latestPosts} />
<a className="more" href="https://blog.webmaker.org/tag/teachtheweb/">See all blog posts</a>
</div>
</div>
Expand Down

0 comments on commit 86fb847

Please sign in to comment.