From 00550872d755a1053fb7585e3fb6bfb69bfc4108 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Fri, 31 Aug 2018 15:15:25 -0700 Subject: [PATCH] hide signup promo when logged in --- app/pages/signin/index.js | 17 +++-------------- app/templates/signupPromo/index.js | 3 +++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/app/pages/signin/index.js b/app/pages/signin/index.js index d69ae1b4..6e8248fe 100644 --- a/app/pages/signin/index.js +++ b/app/pages/signin/index.js @@ -2,16 +2,13 @@ const html = require('choo/html'); const assets = require('../../../common/assets'); const title = require('../../templates/title'); -// eslint-disable-next-line no-unused-vars module.exports = function(state, emit) { return html` -
- - + + ${title(state)} - - - -
`; function submitEmail(event) { event.preventDefault(); - //TODO: hook up fxA onboarding + emit('login'); } }; diff --git a/app/templates/signupPromo/index.js b/app/templates/signupPromo/index.js index 376b5ba0..54dde7d8 100644 --- a/app/templates/signupPromo/index.js +++ b/app/templates/signupPromo/index.js @@ -1,6 +1,9 @@ const html = require('choo/html'); module.exports = function(state) { + if (state.user.loggedIn) { + return null; + } return html`
${state.translate('signInPromoText')}