Cleaning up needless code

This commit is contained in:
brydon1 2023-07-07 21:01:10 -04:00
parent 48ad8f92b7
commit 51daeb0028

View file

@ -76,16 +76,14 @@
class="disclaimer-link"
linkType="text"
text="Privacy Policy"
href="//www.safelite.com/privacy-center"
target="_blank" />
href="//www.safelite.com/privacy-center" />
and
<textLink
ref="termsOfUseLink"
class="disclaimer-link"
linkType="text"
text="Terms of Use"
href="//www.safelite.com/terms-of-use"
target="_blank" />.
href="//www.safelite.com/terms-of-use" />.
</p>
<siteFooter
@ -111,7 +109,6 @@ import textLink from '@/ux-components/text-link/text-link.vue';
// Supporting files
import { fetchCmsContentForPage } from '@/helpers/cms-content-helper';
import { settleAllPromises } from '@/helpers/layout-helper';
import { Form } from 'vee-validate';
import BaseFormMixin from '@/mixins/base-form-mixin';
import { useMainStore } from '@/store';
@ -132,22 +129,10 @@ export default {
},
mixins: [BaseFormMixin],
async beforeRouteEnter(to, from, next) {
// Call APIs
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);
const cmsContent = await fetchCmsContentForPage(to.query.issPage);
next((vm) => {
vm.setCmsContent(resultMap.cmsContent);
vm.setCmsContent(cmsContent);
});
},
data() {