From 461089fcf3462b821464ed957b4ad02c991fbc6e Mon Sep 17 00:00:00 2001 From: Juliana Kang Date: Thu, 7 Nov 2024 08:33:51 -0500 Subject: [PATCH] fix: Remove template literal in Cohesion snippet (#27) EDX-932 RV --- cohesion.config.js | 6 +++--- public/index.html | 16 ++++++++-------- src/feedback/AlertMessage.jsx | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cohesion.config.js b/cohesion.config.js index d45608a85..915773b15 100644 --- a/cohesion.config.js +++ b/cohesion.config.js @@ -8,9 +8,9 @@ const cohesionConfig = { postTypeGql: '', homepageGql: '', siteUrl: process.env.MARKETING_SITE_BASE_URL, - cmsUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL || '', - cmsUser: process.env.WP_USER || '', - cmsPwd: process.env.WP_PWD || '', + cmsUrl: '', + cmsUser: '', + cmsPwd: '', logoUrl: '', studyMatchUrl: '', voyagerUrl: '/discover', diff --git a/public/index.html b/public/index.html index 59c3499cd..2b56cf07b 100755 --- a/public/index.html +++ b/public/index.html @@ -20,10 +20,10 @@ <% } %> <% /* NOTE: Adding Red Ventures related cohesion/tagular code for the launch of the new marketing website. */ %> - <% if (htmlWebpackPlugin.options.cohesionConfig) { %> + <% if (htmlWebpackPlugin?.options?.cohesionConfig) { %> <% } %> diff --git a/src/feedback/AlertMessage.jsx b/src/feedback/AlertMessage.jsx index 31f585bb2..f9b35735d 100644 --- a/src/feedback/AlertMessage.jsx +++ b/src/feedback/AlertMessage.jsx @@ -29,7 +29,7 @@ const AlertMessage = (props) => { useEffect(() => { const observerCallback = (entries) => { entries.forEach(entry => { - if (entry.isIntersecting && messageType === 'success' && userMessage.includes('added to basket')) { + if (entry.isIntersecting && entry.target?.innerText.includes('added to basket')) { const tagularElement = { title: PaymentTitle, url: entry.target?.baseURI,