From f06c5b50833ece50e96995affbe72ea0d12de890 Mon Sep 17 00:00:00 2001 From: julianajlk Date: Wed, 6 Nov 2024 15:18:39 -0500 Subject: [PATCH] fix: Remove template literal in Cohesion snippet --- 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..95ce000b5 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,