Fix PropType errors

stable/1.0.x
Alex Gleason 2020-06-07 17:18:26 -05:00
rodzic d295368170
commit 289f90dd4e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -62,6 +62,7 @@ export function fetchMeFail(error) {
return { return {
type: ME_FETCH_FAIL, type: ME_FETCH_FAIL,
error, error,
skipAlert: true,
}; };
}; };

Wyświetl plik

@ -8,6 +8,7 @@ const FormPropTypes = {
label: PropTypes.oneOfType([ label: PropTypes.oneOfType([
PropTypes.string, PropTypes.string,
PropTypes.object, PropTypes.object,
PropTypes.node,
]), ]),
}; };
@ -38,7 +39,7 @@ InputContainer.propTypes = {
export const LabelInputContainer = ({ label, children, ...props }) => { export const LabelInputContainer = ({ label, children, ...props }) => {
const id = uuidv4(); const id = uuidv4();
const childrenWithProps = React.Children.map(children, child => ( const childrenWithProps = React.Children.map(children, child => (
React.cloneElement(child, { id: id }) React.cloneElement(child, { id: id, key: id })
)); ));
return ( return (

Wyświetl plik

@ -38,7 +38,7 @@ class RegistrationForm extends ImmutablePureComponent {
static propTypes = { static propTypes = {
instance: ImmutablePropTypes.map, instance: ImmutablePropTypes.map,
locale: PropTypes.string, locale: PropTypes.string,
intl: PropTypes.func.isRequired, intl: PropTypes.object.isRequired,
} }
state = { state = {
@ -141,7 +141,7 @@ class RegistrationForm extends ImmutablePureComponent {
/> />
<div className='fields-group'> <div className='fields-group'>
<Checkbox <Checkbox
label={intl.formatMessage(messages.agreement, { tos: <Link to='/about/tos' target='_blank'>{intl.formatMessage(messages.tos)}</Link> })} label={intl.formatMessage(messages.agreement, { tos: <Link to='/about/tos' target='_blank' key={0}>{intl.formatMessage(messages.tos)}</Link> })}
name='agreement' name='agreement'
onChange={this.onCheckboxChange} onChange={this.onCheckboxChange}
required required