diff --git a/.eslintrc.js b/.eslintrc.js index fbfc3b52f1..8141b6fd3f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -45,6 +45,7 @@ module.exports = { 'packages/*/build', 'packages/*/dist', 'packages/*/public/dist', + 'chat-bot.js' ], rules: { quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }], diff --git a/packages/marketplace/src/core/index.tsx b/packages/marketplace/src/core/index.tsx index 1c4fa91f66..c7869043b3 100644 --- a/packages/marketplace/src/core/index.tsx +++ b/packages/marketplace/src/core/index.tsx @@ -22,6 +22,7 @@ window.reapit = { googleAnalyticsKey: '', cognitoOAuthUrl: '', cognitoUserPoolId: '', + chatbotAppId: '', }, } diff --git a/packages/marketplace/src/scripts/chat-bot.js b/packages/marketplace/src/scripts/chat-bot.js index 6fdc5f268f..b2f71ce644 100644 --- a/packages/marketplace/src/scripts/chat-bot.js +++ b/packages/marketplace/src/scripts/chat-bot.js @@ -22,7 +22,7 @@ module.exports = function(loginIdentity) { (n.src = 'https://w.chatlio.com/w.chatlio-widget.js'), (n.async = !0), n.setAttribute('data-embed-version', '2.3') - n.setAttribute('data-widget-id', process.env.CHATBOT_APP_ID) + n.setAttribute('data-widget-id', window.reapit.config.chatbotAppId) c.parentNode.insertBefore(n, c) if (loginIdentity) { diff --git a/packages/marketplace/src/types/global.d.ts b/packages/marketplace/src/types/global.d.ts index ad6c1d25c3..edfe5e457d 100644 --- a/packages/marketplace/src/types/global.d.ts +++ b/packages/marketplace/src/types/global.d.ts @@ -10,6 +10,7 @@ export type Config = { googleAnalyticsKey: string cognitoOAuthUrl: string cognitoUserPoolId: string + chatbotAppId: string } declare global {