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:
Travis Ralston 2021-10-18 13:47:42 -06:00
parent 98ba3fd6e6
commit dad1d3f131
4 changed files with 23 additions and 7 deletions

View file

@ -106,7 +106,11 @@ const NewRoomIntro = () => {
topicText = _t("Topic: %(topic)s ", { topic });
} else if (canAddTopic) {
topicText = _t("<a>Add a topic</a> to help people know what it is about.", {}, {
a: sub => <AccessibleButton kind="link" onClick={onTopicClick}>{ sub }</AccessibleButton>,
a: sub => <AccessibleButton
kind="link"
element="span"
onClick={onTopicClick}
>{ sub }</AccessibleButton>,
});
}