hide signup promo when logged in
This commit is contained in:
parent
85185d048c
commit
00550872d7
|
@ -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`
|
||||
|
||||
<div class="page signInPage">
|
||||
<a href="/" class="goBackButton">
|
||||
<img src="${assets.get('back-arrow.svg')}"/>
|
||||
</a>
|
||||
${title(state)}
|
||||
|
||||
<div class="signIn__info flexible">
|
||||
${state.translate('accountBenefitTitle')}
|
||||
<ul>
|
||||
|
@ -23,19 +20,15 @@ module.exports = function(state, emit) {
|
|||
<li>${state.translate('accountBenefitMore')}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="signIn__form flexible">
|
||||
|
||||
<img class="signIn__firefoxLogo"
|
||||
src="${assets.get('firefox_logo-only.svg')}"
|
||||
width=56 height=56
|
||||
alt="Firefox logo"/>
|
||||
|
||||
<div class="signIn__emailLabel">
|
||||
${state.translate('signInEmailEnter')}
|
||||
</div>
|
||||
${state.translate('signInContinueMessage')}
|
||||
|
||||
<form
|
||||
onsubmit=${submitEmail}
|
||||
data-no-csrf>
|
||||
|
@ -43,24 +36,20 @@ module.exports = function(state, emit) {
|
|||
type="text"
|
||||
class="signIn__emailInput"
|
||||
placeholder=${state.translate('emailEntryPlaceholder')}/>
|
||||
|
||||
<input
|
||||
class='noDisplay'
|
||||
id="emailSubmit"
|
||||
type="submit"/>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<label class="btn" for="emailSubmit">
|
||||
${state.translate('signInContinueButton')}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
function submitEmail(event) {
|
||||
event.preventDefault();
|
||||
//TODO: hook up fxA onboarding
|
||||
emit('login');
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
const html = require('choo/html');
|
||||
|
||||
module.exports = function(state) {
|
||||
if (state.user.loggedIn) {
|
||||
return null;
|
||||
}
|
||||
return html`
|
||||
<div class="signupPromo">
|
||||
<div class="signupPromo__title">${state.translate('signInPromoText')}</div>
|
||||
|
|
Loading…
Reference in New Issue