Fakultas Ilmu Komputer UI

Commit 9b8f464f authored by emil farisan's avatar emil farisan
Browse files

show hackerrank url field on the profile page

parent 27bfd769
......@@ -45,6 +45,7 @@ export default class ProfilePage extends React.Component {
refresh: 1,
loading: false,
linkedin_url: '',
hackerrank_url: '',
};
this.getProfile = this.getProfile.bind(this);
this.handleChange = this.handleChange.bind(this);
......@@ -79,6 +80,7 @@ export default class ProfilePage extends React.Component {
refresh: this.state.refresh + 1,
intro: data.intro,
linkedin_url: data.linkedin_url,
hackerrank_url: data.hackerrank_url,
});
if (this.props.route.own) {
const newSession = this.props.user.data;
......@@ -166,6 +168,10 @@ export default class ProfilePage extends React.Component {
<label htmlFor="linkedin_url">URL Profile LinkedIn</label>
<input onChange={this.handleChange} placeholder="https://www.linkedin.com/in/jojo/" name="linkedin_url" />
</Form.Field>
<Form.Field>
<label htmlFor="hackerrank_url">URL Profile Hackerrank</label>
<input onChange={this.handleChange} placeholder="https://www.hackerrank.com/jane" name="hackerrank_url" />
</Form.Field>
<Form.Field>
<label htmlFor="region">Region</label>
<input onChange={this.handleChange} placeholder="Indonesia" name="region" />
......@@ -271,7 +277,19 @@ export default class ProfilePage extends React.Component {
</Grid.Column>
</Grid>
</Segment>
<Segment basic vertical>
<Grid>
<Grid.Column width={2}>
<Icon name="hackerrank" size="big" />
</Grid.Column>
<Grid.Column width={13}>
<a href={this.state.hackerrank_url}> { this.state.hackerrank_url || 'N/A' } </a>
</Grid.Column>
</Grid>
</Segment>
</div>
<Segment basic vertical>
<Grid>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment