Skip to content

Commit

Permalink
feat: update Chatwoot API key constant
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesNg35 committed Dec 12, 2023
1 parent 586b63f commit 9556969
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/web/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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 || '[email protected]';
export const SMTP_HOST = process.env.SMTP_HOST || '';
export const SMTP_PORT = process.env.SMTP_PORT || '';
Expand Down
3 changes: 2 additions & 1 deletion apps/web/lib/features/integrations/chatwoot/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { CHATWOOT_API_KEY } from '@app/constants';
import React, { useEffect } from 'react';

declare global {
Expand All @@ -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;
}
Expand Down

0 comments on commit 9556969

Please sign in to comment.