const html = require('choo/html'); const assets = require('../../../common/assets'); const title = require('../../templates/title'); module.exports = function(state) { let strings = {}; let why = ''; let url = ''; let buttonAction = ''; if (state.params.reason !== 'outdated') { strings = unsupportedStrings(state); why = html`
${state.translate('notSupportedLink')}
`; url = 'https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com'; buttonAction = html`
Firefox
${strings.button}
`; } else { strings = outdatedStrings(state); url = 'https://support.mozilla.org/kb/update-firefox-latest-version'; buttonAction = html`
${strings.button}
`; } return html`
${title(state)}
${strings.header}
${strings.description} ${why}
${buttonAction}
${strings.explainer}
`; }; function outdatedStrings(state) { return { header: state.translate('notSupportedHeader'), description: state.translate('notSupportedOutdatedDetail'), button: state.translate('updateFirefox'), explainer: state.translate('uploadPageExplainer') }; } function unsupportedStrings(state) { return { header: state.translate('notSupportedHeader'), description: state.translate('notSupportedDetail'), button: state.translate('downloadFirefoxButtonSub'), explainer: state.translate('uploadPageExplainer') }; }