Cleaning up needless code
This commit is contained in:
parent
48ad8f92b7
commit
51daeb0028
1 changed files with 4 additions and 19 deletions
|
|
@ -76,16 +76,14 @@
|
||||||
class="disclaimer-link"
|
class="disclaimer-link"
|
||||||
linkType="text"
|
linkType="text"
|
||||||
text="Privacy Policy"
|
text="Privacy Policy"
|
||||||
href="//www.safelite.com/privacy-center"
|
href="//www.safelite.com/privacy-center" />
|
||||||
target="_blank" />
|
|
||||||
and
|
and
|
||||||
<textLink
|
<textLink
|
||||||
ref="termsOfUseLink"
|
ref="termsOfUseLink"
|
||||||
class="disclaimer-link"
|
class="disclaimer-link"
|
||||||
linkType="text"
|
linkType="text"
|
||||||
text="Terms of Use"
|
text="Terms of Use"
|
||||||
href="//www.safelite.com/terms-of-use"
|
href="//www.safelite.com/terms-of-use" />.
|
||||||
target="_blank" />.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<siteFooter
|
<siteFooter
|
||||||
|
|
@ -111,7 +109,6 @@ import textLink from '@/ux-components/text-link/text-link.vue';
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
|
||||||
import { settleAllPromises } from '@/helpers/layout-helper';
|
|
||||||
import { Form } from 'vee-validate';
|
import { Form } from 'vee-validate';
|
||||||
import BaseFormMixin from '@/mixins/base-form-mixin';
|
import BaseFormMixin from '@/mixins/base-form-mixin';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
|
|
@ -132,22 +129,10 @@ export default {
|
||||||
},
|
},
|
||||||
mixins: [BaseFormMixin],
|
mixins: [BaseFormMixin],
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
// Call APIs
|
const cmsContent = await fetchCmsContentForPage(to.query.issPage);
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
|
||||||
|
|
||||||
// Settle promises and get results
|
|
||||||
const promiseResultMap = [
|
|
||||||
{
|
|
||||||
resultKey: 'cmsContent',
|
|
||||||
promise: cmsContentPromise
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
// use resultMap to populate layout content.
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
|
||||||
|
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(cmsContent);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue