/* global LIMITS */ const html = require('choo/html'); const { bytes } = require('../utils'); module.exports = function() { return function(state, emit, close) { return html`

${state.translate('accountBenefitTitle')}

`; function submitEmail(event) { event.preventDefault(); const el = document.getElementById('email-input'); const email = el.value; if (email) { // just check if it's the right shape const a = email.split('@'); if (a.length === 2 && a.every(s => s.length > 0)) { return emit('login', email); } } el.value = ''; } }; };