Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/components/AccountCard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ const AccountCard = ({ account }) => (
</div>
<div className="col-md-6 accountInfo">
<p className="credibility">{account.credibility}<span className="uom">pts</span></p>
<p >Github: <a href={account.github_handle}>{account.github_handle}</a></p>
<p >LinkedIn: <a href={account.linkedin_url}>{account.linkedin_url}</a></p>
<p >Github: <a href={`https://github.com/${account.github_handle}`}>{account.github_handle}</a></p>
<p >LinkedIn: <a href={`https://www.linkedin.com/in/${account.linkedin_url}/`}>{account.linkedin_url}</a></p>
<p >Resume Site: <a href={account.resume_site_url}>{account.resume_site_url}</a></p>
<p >StackOverflow: <a href={account.stackoverflow_url}>{account.stackoverflow_url}</a></p>
<p >Twitter: <a href={account.twitter_handle}>{account.twitter_handle}</a></p>
<p >StackOverflow: <a href={account.stackoverflow_url}>{account.stackoverflow_url
.substring(
account.stackoverflow_url.lastIndexOf('/') + 1,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@montethinks why is the lastIndexOf('/') necessary here instead of just account.stackoverflow_url?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @binarymason I added that to trim the username from the url so that the link displays as the stackoverflow username similar to the Twitter and Github links instead of https://stackoverflow.com/users/<id>/<user_name>. I can change it and resubmit if it's not inline with what you had in mind.

)}</a></p>
<p >Twitter: <a href={`https://twitter.com/${account.twitter_handle}`}>{account.twitter_handle}</a></p>
</div>
</div>
</div>
Expand Down