added ver to qsurvey url
This commit is contained in:
parent
28a7e0f717
commit
1849d712b1
3 changed files with 37 additions and 8 deletions
|
@ -1,5 +1,16 @@
|
|||
const html = require('choo/html');
|
||||
const assets = require('../../common/assets');
|
||||
/*
|
||||
The current weback config uses package.json to generate
|
||||
version.json for /__version__ meaning `require` returns the
|
||||
string 'version.json' in the frontend context but the json
|
||||
on the server.
|
||||
|
||||
We want `version` to be constant at build time so this file
|
||||
has a custom loader (/build/version_loader.js) just to replace
|
||||
string with the value from package.json. 🤢
|
||||
*/
|
||||
const version = require('../../package.json').version || 'VERSION';
|
||||
|
||||
module.exports = function(state) {
|
||||
return html`<header class="header">
|
||||
|
@ -14,8 +25,9 @@ module.exports = function(state) {
|
|||
<div>${state.translate('siteSubtitle')}</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="https://qsurvey.mozilla.com/s3/txp-firefox-send" rel="noreferrer noopener" class="feedback" target="_blank">${state.translate(
|
||||
'siteFeedback'
|
||||
)}</a>
|
||||
<a href="https://qsurvey.mozilla.com/s3/txp-firefox-send?ver=${version}"
|
||||
rel="noreferrer noopener"
|
||||
class="feedback"
|
||||
target="_blank">${state.translate('siteFeedback')}</a>
|
||||
</header>`;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue