From e9d5d87691a5cdc82dabeb31313e5c1719125e2a Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 6 Nov 2018 14:40:10 -0800 Subject: [PATCH] changed sign in area --- app/ui/account.js | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/app/ui/account.js b/app/ui/account.js index d9f92ff6..3e25a0dc 100644 --- a/app/ui/account.js +++ b/app/ui/account.js @@ -1,26 +1,16 @@ const html = require('choo/html'); -const itemClass = - 'block px-4 py-2 text-grey-darkest hover:bg-blue hover:text-white cursor-pointer'; module.exports = function(state, emit) { if (!state.capabilities.account) { return null; } const user = state.user; - const menuItems = []; - if (user.loggedIn) { - menuItems.push(html`
  • ${user.email}
  • `); - menuItems.push( - html`
  • ${state.translate( - 'logOut' - )}
  • ` - ); - } else { - menuItems.push( - html`
  • ${state.translate( - 'signInMenuOption' - )}
  • ` - ); + if (!user.loggedIn) { + return html``; } return html`
    - ${menuItems} +
  • ${user.email}
  • +
  • + + ${state.translate('logOut')} + +
  • `;