From 6489ab6a56fb1386922f3258b0b0c1d82f52a628 Mon Sep 17 00:00:00 2001 From: Soumya Himanish Mohapatra Date: Fri, 12 Jan 2018 10:52:11 +0530 Subject: [PATCH] Restricted the banner from showing on unsupported browsers --- app/routes/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/routes/index.js b/app/routes/index.js index 7cdd83d9..4bf6a55a 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -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` - ${state.promo ? fxPromo(state, emit) : ''} + ${showBanner(state) ? fxPromo(state, emit) : ''} ${header(state)}