Skip to content

Commit

Permalink
add Log in/register message for anon users
Browse files Browse the repository at this point in the history
to join groups.
addresses #15
  • Loading branch information
fcheslack committed Feb 22, 2018
1 parent d93666a commit 4984f07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/GroupInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class GroupMembershipActions extends React.Component{
}
render(){
if(!currentUser){
return null;
return <p><a href={buildUrl('login')}>Log in</a> or <a href={buildUrl('register')}>Register</a> to join groups</p>;
}
let group = this.props.group;
let member = allGroupMembers(group).includes(currentUser.userID);
Expand Down
4 changes: 4 additions & 0 deletions src/js/wwwroutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ let buildUrl = function(name, params){
return '/download/connectors';
case 'download':
return '/download';
case 'login':
return '/user/login';
case 'register':
return '/user/register';
}
throw new Error('Unknown route in buildUrl');
};
Expand Down

0 comments on commit 4984f07

Please sign in to comment.