enable promo banner
This commit is contained in:
parent
44043b54b3
commit
d28da3247d
3 changed files with 17 additions and 3 deletions
|
@ -4,7 +4,15 @@ const Header = require('./header');
|
|||
const Footer = require('./footer');
|
||||
|
||||
function banner(state) {
|
||||
if (state.promo && !state.route.startsWith('/unsupported/')) {
|
||||
if (state.layout) {
|
||||
return; // server side
|
||||
}
|
||||
const show =
|
||||
!state.capabilities.standalone &&
|
||||
!/firefox/i.test(navigator.userAgent) &&
|
||||
document.querySelector('html').lang.startsWith('en') &&
|
||||
!state.route.startsWith('/unsupported/');
|
||||
if (show) {
|
||||
return state.cache(Promo, 'promo').render();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ class Promo extends Component {
|
|||
<a
|
||||
class="text-blue"
|
||||
href="https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com"
|
||||
>Download Firefox now ≫</a
|
||||
>
|
||||
Download Firefox now ≫</a
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue