-
Notifications
You must be signed in to change notification settings - Fork 10
/
EditProfile.js
93 lines (86 loc) · 3.82 KB
/
EditProfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import React, { Component } from 'react';
import mixpanel from 'mixpanel-browser';
class EditProfile extends Component {
constructor(props) {
super(props);
this.state = {
username: '',
email: '',
bio: '',
firstName: '',
lastName: ''
}
}
componentDidMount() {
mixpanel.init('333f6269317ae9b78a29c535e29f00bf')
mixpanel.track("Edit Profile Page");
}
submitForm() {
// go through items in the state and only send the ones that have been updated
// make sure that the user can only submit an edit request for their OWN user account
}
// Kash was here
render() {
const { username, email, bio, firstName, lastName } = this.state;
return(
<div className="row">
<div className="col-md-2"></div>
<div className="col-md-8">
<div className="card">
<div className="card-header card-header-icon" data-background-color="rose">
<i className="material-icons">perm_identity</i>
</div>
<div className="card-content">
<h4 className="card-title">Edit Profile -
<small className="category"> Complete your profile</small>
</h4>
<form>
<div className="row">
<div className="col-md-3">
<div className="form-group label-floating is-empty">
<label className="control-label">Username</label>
<input type="text" className="form-control" value={username} onChange={(e) => this.setState({username: e.target.value})}/>
<span className="material-input"></span></div>
</div>
<div className="col-md-4">
<div className="form-group label-floating is-empty">
<label className="control-label">Email address</label>
<input type="email" className="form-control" value={email} onChange={(e) => this.setState({email: e.target.value})}/>
<span className="material-input"></span></div>
</div>
</div>
<div className="row">
<div className="col-md-6">
<div className="form-group label-floating is-empty">
<label className="control-label">First Name</label>
<input type="text" className="form-control" value={firstName} onChange={(e) => this.setState({firstName: e.target.value})}/>
<span className="material-input"></span></div>
</div>
<div className="col-md-6">
<div className="form-group label-floating is-empty">
<label className="control-label">Last Name</label>
<input type="text" className="form-control" value={lastName} onChange={(e) => this.setState({lastName: e.target.value})}/>
<span className="material-input"></span></div>
</div>
</div>
<div className="row">
<div className="col-md-12">
<div className="form-group">
<label>About Me</label>
<div className="form-group label-floating is-empty">
<textarea className="form-control" rows="5" value={bio} onChange={(e) => this.setState({bio: e.target.value})} ></textarea>
<span className="material-input"></span></div>
</div>
</div>
</div>
<button type="submit" className="btn btn-rose pull-right">Update Profile</button>
<div className="clearfix"></div>
</form>
</div>
</div>
</div>
</div>
);
}
}
export default EditProfile;