Commit b9ecbae5 authored by Matthew Taylor's avatar Matthew Taylor

Merge pull request #166 from mewtaylor/issue/159-clear-activity-block

#159 – Set empty states on sign out
parents ade0959d eb38951f
...@@ -39,6 +39,8 @@ var Splash = injectIntl(React.createClass({ ...@@ -39,6 +39,8 @@ var Splash = injectIntl(React.createClass({
this.getNews(); this.getNews();
} else { } else {
this.setState({featuredCustom: []}); this.setState({featuredCustom: []});
this.setState({activity: []});
this.setState({news: []});
this.getProjectCount(); this.getProjectCount();
} }
} }
...@@ -57,7 +59,7 @@ var Splash = injectIntl(React.createClass({ ...@@ -57,7 +59,7 @@ var Splash = injectIntl(React.createClass({
this.api({ this.api({
uri: '/proxy/users/' + this.state.session.user.username + '/activity?limit=5' uri: '/proxy/users/' + this.state.session.user.username + '/activity?limit=5'
}, function (err, body) { }, function (err, body) {
if (!err) this.setState({'activity': body}); if (!err) this.setState({activity: body});
}.bind(this)); }.bind(this));
}, },
getFeaturedGlobal: function () { getFeaturedGlobal: function () {
...@@ -78,7 +80,7 @@ var Splash = injectIntl(React.createClass({ ...@@ -78,7 +80,7 @@ var Splash = injectIntl(React.createClass({
this.api({ this.api({
uri: '/news?limit=3' uri: '/news?limit=3'
}, function (err, body) { }, function (err, body) {
if (!err) this.setState({'news': body}); if (!err) this.setState({news: body});
}.bind(this)); }.bind(this));
}, },
getProjectCount: function () { getProjectCount: function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment