Merge pull request #702 from himanish-star/remove-banner

Restricted the banner from showing on unsupported browsers
This commit is contained in:
Danny Coates 2018-01-13 14:50:17 -08:00 committed by GitHub
commit f3d77fdcf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -7,10 +7,14 @@ const fxPromo = require('../templates/fxPromo');
const app = choo();
function showBanner(state) {
return state.promo && !state.route.startsWith('/unsupported/');
}
function body(template) {
return function(state, emit) {
const b = html`<body>
${state.promo ? fxPromo(state, emit) : ''}
${showBanner(state) ? fxPromo(state, emit) : ''}
${header(state)}
<div class="all">
<noscript>