diff --git a/apps/web/app/constants.ts b/apps/web/app/constants.ts index 7ba67c7e4..822206cc6 100644 --- a/apps/web/app/constants.ts +++ b/apps/web/app/constants.ts @@ -32,6 +32,7 @@ export const ACTIVE_PROJECT_COOKIE_NAME = 'auth-active-project'; export const RECAPTCHA_SITE_KEY = getNextPublicEnv('NEXT_PUBLIC_CAPTCHA_SITE_KEY'); export const RECAPTCHA_SECRET_KEY = process.env.CAPTCHA_SECRET_KEY; +// Gauzy Server URL export const GAUZY_API_SERVER_URL = process.env.GAUZY_API_SERVER_URL || 'https://api.gauzy.co/api'; export const GAUZY_API_BASE_SERVER_URL = getNextPublicEnv('NEXT_PUBLIC_GAUZY_API_SERVER_URL', 'https://api.gauzy.co'); @@ -42,6 +43,9 @@ export const VERIFY_EMAIL_CALLBACK_URL = process.env.VERIFY_EMAIL_CALLBACK_URL | export const VERIFY_EMAIL_CALLBACK_PATH = '/verify-email'; export const GA_MEASUREMENT_ID = getNextPublicEnv('NEXT_PUBLIC_GA_MEASUREMENT_ID'); +// Chatwoot +export const CHATWOOT_API_KEY = getNextPublicEnv('NEXT_PUBLIC_CHATWOOT_API_KEY'); + export const SMTP_FROM_ADDRESS = process.env.SMTP_FROM_ADDRESS || 'noreply@ever.team'; export const SMTP_HOST = process.env.SMTP_HOST || ''; export const SMTP_PORT = process.env.SMTP_PORT || ''; diff --git a/apps/web/lib/features/integrations/chatwoot/index.tsx b/apps/web/lib/features/integrations/chatwoot/index.tsx index 9bcce5240..849acf12e 100644 --- a/apps/web/lib/features/integrations/chatwoot/index.tsx +++ b/apps/web/lib/features/integrations/chatwoot/index.tsx @@ -1,3 +1,4 @@ +import { CHATWOOT_API_KEY } from '@app/constants'; import React, { useEffect } from 'react'; declare global { @@ -9,7 +10,7 @@ declare global { export default function ChatwootWidget() { useEffect(() => { - const websiteToken = process.env.NEXT_PUBLIC_CHATWOOT_API_KEY; + const websiteToken = CHATWOOT_API_KEY.value; if (!websiteToken) { return; }