Hi guys, after a upgrade my version of react for 16 i have this issue, i follow the guide for the new method of use PropTypes, here is my code .
i import Proprtypes from ‘prop-types’;
return (
<div>
{ errorLogin ? this.showNotification(errorLogin, LEVEL_ERROR) : undefined }
{ successLogin ? this.showNotification(successLogin, LEVEL_SUCCESS) : undefined }
<ResetPasswordDialog open={openReset} funcClose={funcClose}/>
<NotificationSystem ref="notificationSystemLogin" />
<Layout className="layout" style={{ width: '100%' }} >
<Content>
<div style={{ background: '#fff', padding: 24, minHeight: 280, height: 600 }}>
<Row
type="flex"
justify="space-around"
align="middle"
style={{ background: '#fff', height: 500}}
>
<Col>
<DemoBox value={500}>
<center>
<div style={{width: '100%'}}>
<img style={{width: '60%', height: '60%'}} src='/images/hb.png' />
</div>
<div style={{width: '100%'}}>
<h2 style={{color: blueHyo, paddingBottom: 10}}>Bem-vindo ao ROI IIOT</h2>
</div>
</center>
<Form onSubmit={ this.handleSubmit } className="login-form">
<FormItem
validateStatus={ userNameError ? 'error' : '' }
help={ userNameError || '' }
>
{getFieldDecorator('userName', {
rules: [ { required: true, message: 'Usuário obrigatório' } ],
})(
<Input
prefix={<Icon type="user"style={{ fontSize: 13 }} />}
placeholder="Username"
/>
)}
</FormItem>
<FormItem
validateStatus={ passwordError ? 'error' : '' }
help={ passwordError || '' }
>
{getFieldDecorator('password', {
rules: [ { required: true, message: 'Senha obrigatória' } ],
})(
<Input
prefix={<Icon type="lock" style={{ fontSize: 13 }} />}
type="password"
placeholder="Password"
/>
)}
</FormItem>
<FormItem>
<Button
style={style.bottonForgot}
onClick={funcClose}
>
Reset
</Button>
<Button
style={style.bottonLogin}
type="primary"
htmlType="submit"
loading={this.state.loading}
disabled={hasErrors(getFieldsError())}
>
<FormattedMessage
id="login"
defaultMessage="Login"
/>
</Button>
</FormItem>
</Form>
</DemoBox>
</Col>
</Row>
</div>
</Content>
</Layout>
</div>
);
}
}
LoginAppForm.propTypes = {
openReset: PropTypes.bool,
modalVisible: PropTypes.bool,
theme: PropTypes.string,
funcClose: PropTypes.func
};