Compute cms without reloading page.

This commit is contained in:
Chloe Herd 2023-08-15 13:22:48 -04:00
parent 0cddad3cf4
commit 4f53a1fa45

View file

@ -36,7 +36,10 @@ export default {
return this.customer?.phoneNumber;
},
smsOptIn() {
return this.getCmsContent(this.cmsWidgetName, "SubheaderText");
const rawCmsText = this.getCmsContent(this.cmsWidgetName, "SubheaderText");
const joinerText = this.customer?.isSmsOptIn ? "in to" : "out of";
return rawCmsText.replace("{custom:smsOptInJoiner}", joinerText);
},
},
components: {