mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-12 23:45:57 +00:00
17 lines
487 B
JavaScript
17 lines
487 B
JavaScript
const React = require('react');
|
|
const Nav = require('naturalcrit/nav/nav.jsx');
|
|
|
|
module.exports = function(props){
|
|
if(global.account){
|
|
return <Nav.item href={`/user/${global.account.username}`} color='yellow' icon='fa-user'>
|
|
{global.account.username}
|
|
</Nav.item>;
|
|
}
|
|
let url = '';
|
|
if(typeof window !== 'undefined'){
|
|
url = window.location.href;
|
|
}
|
|
return <Nav.item href={`http://naturalcrit.com/login?redirect=${url}`} color='teal' icon='fa-sign-in'>
|
|
login
|
|
</Nav.item>;
|
|
}; |