Fix runtime react errors for various parts of the app
These are just the ones that were causing console flooding on reload in development. * Elements in a list need a `key` * `super()` needs to be supplied with the same props as the parent * `<div>` (AccessibleButton) cannot be a descendant of `<p>` - this was a problem in the NewRoomIntro "Add topic" button * `label` is a non-boolean property and cannot receive "false"
This commit is contained in:
parent
98ba3fd6e6
commit
dad1d3f131
4 changed files with 23 additions and 7 deletions
|
@ -162,12 +162,14 @@ export default class RoomHeader extends React.Component<IProps> {
|
|||
className="mx_RoomHeader_button mx_RoomHeader_voiceCallButton"
|
||||
onClick={() => this.props.onCallPlaced(PlaceCallType.Voice)}
|
||||
title={_t("Voice call")}
|
||||
key="voice"
|
||||
/>;
|
||||
const videoCallButton = <AccessibleTooltipButton
|
||||
className="mx_RoomHeader_button mx_RoomHeader_videoCallButton"
|
||||
onClick={(ev: React.MouseEvent<Element>) => ev.shiftKey ?
|
||||
this.displayInfoDialogAboutScreensharing() : this.props.onCallPlaced(PlaceCallType.Video)}
|
||||
title={_t("Video call")}
|
||||
key="video"
|
||||
/>;
|
||||
buttons.push(voiceCallButton, videoCallButton);
|
||||
}
|
||||
|
@ -177,6 +179,7 @@ export default class RoomHeader extends React.Component<IProps> {
|
|||
className="mx_RoomHeader_button mx_RoomHeader_forgetButton"
|
||||
onClick={this.props.onForgetClick}
|
||||
title={_t("Forget room")}
|
||||
key="forget"
|
||||
/>;
|
||||
buttons.push(forgetButton);
|
||||
}
|
||||
|
@ -188,6 +191,7 @@ export default class RoomHeader extends React.Component<IProps> {
|
|||
})}
|
||||
onClick={this.props.onAppsClick}
|
||||
title={this.props.appsShown ? _t("Hide Widgets") : _t("Show Widgets")}
|
||||
key="apps"
|
||||
/>;
|
||||
buttons.push(appsButton);
|
||||
}
|
||||
|
@ -197,6 +201,7 @@ export default class RoomHeader extends React.Component<IProps> {
|
|||
className="mx_RoomHeader_button mx_RoomHeader_searchButton"
|
||||
onClick={this.props.onSearchClick}
|
||||
title={_t("Search")}
|
||||
key="search"
|
||||
/>;
|
||||
buttons.push(searchButton);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue