0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-16 12:32:39 +00:00
Files
homebrewery/client/homebrew/navbar/account.navitem.jsx
2016-11-25 00:28:48 -05:00

17 lines
482 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'>
profile
</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>
};