Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1975 Theme Framework & GH-1972 Palm Theme #517

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Remove console error
  • Loading branch information
benstrumeyer committed Mar 12, 2020
commit f9b154628d18d30ee46099f397b0340b30a0cf74
@@ -50,12 +50,12 @@ class RadioButtonGroup extends React.Component {
const { buttons } = this.state;
return (
this.props.items.map((item, index) => (
<div className="flex-container align-justify RadioButtonGroup__container">
<div className="flex-container align-justify RadioButtonGroup__container" key={`${index * 2}`}>

This comment has been minimized.

@wlycdgr

wlycdgr Mar 27, 2020
Member

React docs advise against using array indices as keys if there's another unique identifier available. Can we use the labels?

This comment has been minimized.

@benstrumeyer

benstrumeyer Mar 31, 2020
Author Contributor

Yes we can!

<span className="RadioButtonGroup__label">
{t(item.text)}
</span>
<div>
<RadioButton key={buttons[index]} checked={buttons[index]} handleClick={() => this.handleClick(index)} />
<RadioButton checked={buttons[index]} handleClick={() => this.handleClick(index)} />
</div>
</div>
))
@@ -8,6 +8,7 @@
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0
ProTip! Use n and p to navigate between commits in a pull request.