fix: Update survey locale based on the account (#4207)
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
|
||||
<script>
|
||||
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
const {
|
||||
LOGO_THUMBNAIL: logoThumbnail,
|
||||
@@ -41,13 +40,20 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({ referrerHost: 'appConfig/getReferrerHost' }),
|
||||
brandRedirectURL() {
|
||||
const baseURL = `${this.globalConfig.widgetBrandURL}?utm_source=widget_branding`;
|
||||
if (this.referrerHost) {
|
||||
return `${baseURL}&utm_referrer=${this.referrerHost}`;
|
||||
try {
|
||||
const referrerHost = this.$store.getters['appConfig/getReferrerHost'];
|
||||
const baseURL = `${this.globalConfig.widgetBrandURL}?utm_source=${
|
||||
referrerHost ? 'widget_branding' : 'survey_branding'
|
||||
}`;
|
||||
if (referrerHost) {
|
||||
return `${baseURL}&utm_referrer=${referrerHost}`;
|
||||
}
|
||||
return baseURL;
|
||||
} catch (e) {
|
||||
// Suppressing the error as getter is not defined in some cases
|
||||
}
|
||||
return baseURL;
|
||||
return '';
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user