mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Fix GH-39: use the current user's profile URL
This commit is contained in:
parent
a696f30040
commit
f613255cc7
1 changed files with 5 additions and 1 deletions
|
@ -34,6 +34,10 @@ module.exports = React.createClass({
|
|||
});
|
||||
}
|
||||
},
|
||||
getProfileUrl: function () {
|
||||
if (!this.state.session.user) return;
|
||||
return '/users/' + this.state.session.user.username + '/';
|
||||
},
|
||||
handleLoginClick: function (e) {
|
||||
e.preventDefault();
|
||||
this.setState({'loginOpen': !this.state.loginOpen});
|
||||
|
@ -122,7 +126,7 @@ module.exports = React.createClass({
|
|||
as="ul"
|
||||
isOpen={this.state.accountNavOpen}
|
||||
onRequestClose={this.closeAccountNav}>
|
||||
<li><a href="/users/raimondious/">Profile</a></li>
|
||||
<li><a href={this.getProfileUrl()}>Profile</a></li>
|
||||
<li><a href="/mystuff/">My Stuff</a></li>
|
||||
<li><a href="/accounts/settings/">Account settings</a></li>
|
||||
<li className="divider">
|
||||
|
|
Loading…
Reference in a new issue