Add missing react keys, fixing the warning (#7360)

This commit is contained in:
Michael Telatynski 2021-12-14 15:15:27 +00:00 committed by GitHub
parent a667677c57
commit b2548f05a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,25 +89,49 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> {
}); });
groups.getOrCreate(LabGroup.Widgets, []).push( groups.getOrCreate(LabGroup.Widgets, []).push(
<SettingsFlag name="enableWidgetScreenshots" level={SettingLevel.ACCOUNT} />, <SettingsFlag
key="enableWidgetScreenshots"
name="enableWidgetScreenshots"
level={SettingLevel.ACCOUNT}
/>,
); );
groups.getOrCreate(LabGroup.Experimental, []).push( groups.getOrCreate(LabGroup.Experimental, []).push(
<SettingsFlag name="lowBandwidth" level={SettingLevel.DEVICE} />, <SettingsFlag
key="lowBandwidth"
name="lowBandwidth"
level={SettingLevel.DEVICE}
/>,
); );
groups.getOrCreate(LabGroup.Developer, []).push( groups.getOrCreate(LabGroup.Developer, []).push(
<SettingsFlag name="developerMode" level={SettingLevel.ACCOUNT} />, <SettingsFlag
<SettingsFlag name="showHiddenEventsInTimeline" level={SettingLevel.DEVICE} />, key="developerMode"
name="developerMode"
level={SettingLevel.ACCOUNT}
/>,
<SettingsFlag
key="showHiddenEventsInTimeline"
name="showHiddenEventsInTimeline"
level={SettingLevel.DEVICE}
/>,
); );
groups.getOrCreate(LabGroup.Analytics, []).push( groups.getOrCreate(LabGroup.Analytics, []).push(
<SettingsFlag name="automaticErrorReporting" level={SettingLevel.DEVICE} />, <SettingsFlag
key="automaticErrorReporting"
name="automaticErrorReporting"
level={SettingLevel.DEVICE}
/>,
); );
if (this.state.showHiddenReadReceipts) { if (this.state.showHiddenReadReceipts) {
groups.getOrCreate(LabGroup.Messaging, []).push( groups.getOrCreate(LabGroup.Messaging, []).push(
<SettingsFlag name="feature_hidden_read_receipts" level={SettingLevel.DEVICE} />, <SettingsFlag
key="feature_hidden_read_receipts"
name="feature_hidden_read_receipts"
level={SettingLevel.DEVICE}
/>,
); );
} }