Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constructor(props)
- {
- super(props);
- this.state = {
- email: '',
- first_name: '',
- middle_name: '',
- country: '',
- country_code: '',
- mobile_number: '',
- gender: ''
- }
- }
- componentDidMount()
- {
- store.dispatch(getUserProfile())
- .then(() => {
- const user = this.props.userProfile.userProfile && this.props.userProfile.userProfile.data.data;
- this.setState({
- email: user.email,
- first_name: user.first_name
- });
- })
- }
- render()
- {
- return (
- <div className="form-group col-sm-12">
- <label htmlFor="email">Email*</label>
- <input type="email" name="email" value={this.state.email || ''}/>
- </div>
- <div className="form-group col-sm-12">
- <label htmlFor="email">First Name*</label>
- <input type="email" name="email" value={this.state.first_name || ''}/>
- </div>
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement