Fix some PR feedback
parent
c033d5defd
commit
f0aaca0a31
|
@ -37,10 +37,6 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
this.setState({
|
|
||||||
phase: "GroupView.LOADING",
|
|
||||||
summary: null,
|
|
||||||
})
|
|
||||||
this._loadGroupFromServer(this.props.groupId)
|
this._loadGroupFromServer(this.props.groupId)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -62,7 +58,7 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
phase: err.httpStatus == 404 ? "GroupView.NOT_FOUND" :"GroupView.ERROR",
|
phase: err.httpStatus === 404 ? "GroupView.NOT_FOUND" : "GroupView.ERROR",
|
||||||
summary: null,
|
summary: null,
|
||||||
error: err,
|
error: err,
|
||||||
});
|
});
|
||||||
|
@ -77,9 +73,9 @@ module.exports = React.createClass({
|
||||||
return <Loader />;
|
return <Loader />;
|
||||||
} else if (this.state.phase == "GroupView.DISPLAY") {
|
} else if (this.state.phase == "GroupView.DISPLAY") {
|
||||||
const summary = this.state.summary;
|
const summary = this.state.summary;
|
||||||
let avatar_url = null;
|
let avatarUrl = null;
|
||||||
if (summary.profile.avatar_url) {
|
if (summary.profile.avatarUrl) {
|
||||||
avatar_url = MatrixClientPeg.get().mxcUrlToHttp(summary.profile.avatar_url);
|
avatarUrl = MatrixClientPeg.get().mxcUrlToHttp(summary.profile.avatarUrl);
|
||||||
}
|
}
|
||||||
let description = null;
|
let description = null;
|
||||||
if (summary.profile.long_description) {
|
if (summary.profile.long_description) {
|
||||||
|
@ -90,7 +86,7 @@ module.exports = React.createClass({
|
||||||
<div className="mx_RoomHeader">
|
<div className="mx_RoomHeader">
|
||||||
<div className="mx_RoomHeader_wrapper">
|
<div className="mx_RoomHeader_wrapper">
|
||||||
<div className="mx_RoomHeader_avatar">
|
<div className="mx_RoomHeader_avatar">
|
||||||
<BaseAvatar url={avatar_url} name={summary.profile.name}
|
<BaseAvatar url={avatarUrl} name={summary.profile.name}
|
||||||
width={48} height={48} />
|
width={48} height={48} />
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_RoomHeader_info">
|
<div className="mx_RoomHeader_info">
|
||||||
|
|
|
@ -282,10 +282,9 @@ export default React.createClass({
|
||||||
right_panel = <RightPanel userId={this.props.viewUserId} opacity={this.props.rightOpacity} />;
|
right_panel = <RightPanel userId={this.props.viewUserId} opacity={this.props.rightOpacity} />;
|
||||||
break;
|
break;
|
||||||
case PageTypes.GroupView:
|
case PageTypes.GroupView:
|
||||||
// TODO
|
|
||||||
page_element = <GroupView
|
page_element = <GroupView
|
||||||
groupId={this.props.currentGroupId}
|
groupId={this.props.currentGroupId}
|
||||||
/>
|
/>;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue