kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Fix PropType errors
rodzic
d295368170
commit
289f90dd4e
|
@ -62,6 +62,7 @@ export function fetchMeFail(error) {
|
||||||
return {
|
return {
|
||||||
type: ME_FETCH_FAIL,
|
type: ME_FETCH_FAIL,
|
||||||
error,
|
error,
|
||||||
|
skipAlert: true,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
|
@ -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
|
||||||
|
|
Ładowanie…
Reference in New Issue