0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 11:52:44 +00:00
Files
homebrewery/client/homebrew/navbar/account.navitem.jsx
2016-11-27 18:55:50 -05:00

17 lines
500 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>
};