Skip to content

Hyperlinks on user profile Issue #39#67

Open
montethinks wants to merge 4 commits intocharlottedevs:masterfrom
montethinks:user-hyperlinks
Open

Hyperlinks on user profile Issue #39#67
montethinks wants to merge 4 commits intocharlottedevs:masterfrom
montethinks:user-hyperlinks

Conversation

@montethinks
Copy link
Copy Markdown

I updated the hyperlinks on the user profile page to resolve to the appropriate site i.e. https://twitter.com/<handle>. The Stack Overflow link resolves to the user's profile page but only the username is displayed.

<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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants