PR feedback
This commit is contained in:
parent
b420a8389d
commit
1e713557bb
4 changed files with 37 additions and 34 deletions
|
@ -79,7 +79,7 @@ export default React.createClass({
|
|||
}
|
||||
|
||||
let nameNode;
|
||||
if (summary.profile.name) {
|
||||
if (summary.profile && summary.profile.name) {
|
||||
nameNode = <div className="mx_RoomHeader_name">
|
||||
<span>{summary.profile.name}</span>
|
||||
<span className="mx_GroupView_header_groupid">
|
||||
|
@ -92,6 +92,8 @@ export default React.createClass({
|
|||
</div>;
|
||||
}
|
||||
|
||||
const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null;
|
||||
|
||||
return (
|
||||
<div className="mx_GroupView">
|
||||
<div className="mx_RoomHeader">
|
||||
|
@ -99,7 +101,7 @@ export default React.createClass({
|
|||
<div className="mx_RoomHeader_avatar">
|
||||
<GroupAvatar
|
||||
groupId={this.props.groupId}
|
||||
groupAvatarUrl={summary.profile.avatar_url}
|
||||
groupAvatarUrl={groupAvatarUrl}
|
||||
width={48} height={48}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -61,9 +61,6 @@ export default withMatrixClient(React.createClass({
|
|||
this._fetch();
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
},
|
||||
|
||||
_onCreateGroupClick: function() {
|
||||
const CreateGroupDialog = sdk.getComponent("dialogs.CreateGroupDialog");
|
||||
Modal.createDialog(CreateGroupDialog);
|
||||
|
@ -73,7 +70,7 @@ export default withMatrixClient(React.createClass({
|
|||
this.props.matrixClient.getJoinedGroups().done((result) => {
|
||||
this.setState({groups: result.groups, error: null});
|
||||
}, (err) => {
|
||||
this.setState({result: null, error: err});
|
||||
this.setState({groups: null, error: err});
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -93,12 +90,12 @@ export default withMatrixClient(React.createClass({
|
|||
);
|
||||
});
|
||||
content = <div>
|
||||
<div>{_t('You are a member of these groups')}:</div>
|
||||
<div>{_t('You are a member of these groups:')}</div>
|
||||
{groupNodes}
|
||||
</div>;
|
||||
} else if (this.state.error) {
|
||||
content = <div className="mx_MyGroups_error">
|
||||
Error whilst fetching joined groups
|
||||
{_t('Error whilst fetching joined groups')}
|
||||
</div>;
|
||||
} else {
|
||||
content = <Loader />;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue