From f0aaca0a31166379461c625e71dbca8c47722a27 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 27 Jun 2017 10:05:05 +0100 Subject: [PATCH] Fix some PR feedback --- src/components/structures/GroupView.js | 14 +++++--------- src/components/structures/LoggedInView.js | 3 +-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index fcb1885261..9140ee2c71 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -37,10 +37,6 @@ module.exports = React.createClass({ }, componentWillMount: function() { - this.setState({ - phase: "GroupView.LOADING", - summary: null, - }) this._loadGroupFromServer(this.props.groupId) }, @@ -62,7 +58,7 @@ module.exports = React.createClass({ }); }, (err) => { this.setState({ - phase: err.httpStatus == 404 ? "GroupView.NOT_FOUND" :"GroupView.ERROR", + phase: err.httpStatus === 404 ? "GroupView.NOT_FOUND" : "GroupView.ERROR", summary: null, error: err, }); @@ -77,9 +73,9 @@ module.exports = React.createClass({ return ; } else if (this.state.phase == "GroupView.DISPLAY") { const summary = this.state.summary; - let avatar_url = null; - if (summary.profile.avatar_url) { - avatar_url = MatrixClientPeg.get().mxcUrlToHttp(summary.profile.avatar_url); + let avatarUrl = null; + if (summary.profile.avatarUrl) { + avatarUrl = MatrixClientPeg.get().mxcUrlToHttp(summary.profile.avatarUrl); } let description = null; if (summary.profile.long_description) { @@ -90,7 +86,7 @@ module.exports = React.createClass({
-
diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 988c0f5ccc..aef7fe9cce 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -282,10 +282,9 @@ export default React.createClass({ right_panel = ; break; case PageTypes.GroupView: - // TODO page_element = + />; break; }