diff --git a/src/client/analytics/Analytics.tsx b/src/client/analytics/Analytics.tsx
index 7d904f2a..8e81df45 100644
--- a/src/client/analytics/Analytics.tsx
+++ b/src/client/analytics/Analytics.tsx
@@ -9,7 +9,8 @@ import { env } from '../../env';
import { GoogleTagManager } from './Gtm';
import { Amplitude } from './Amplitude';
-import { useEffect } from 'react';
+import React, { useEffect } from 'react';
+import InkeepChatButton from '../inkeep/chat-button/inkeep-chat-button';
// GTM API requires dataLayer access through global window variable
declare global {
@@ -38,6 +39,7 @@ export const Analytics = () => {
<>
{GTM_ID ? : null}
{AMPLITUDE_API_KEY ? : null}
+
>
);
};
diff --git a/src/client/components/Container/index.tsx b/src/client/components/Container/index.tsx
index 77f382af..669b2cd2 100644
--- a/src/client/components/Container/index.tsx
+++ b/src/client/components/Container/index.tsx
@@ -1,7 +1,6 @@
import React from 'react';
import styles from './Container.module.scss';
import classNames from 'classnames';
-import InkeepChatButton from '../../inkeep/chat-button/inkeep-chat-button';
export default function Container({
children,
@@ -17,20 +16,17 @@ export default function Container({
containerId?: string;
}) {
return (
- <>
-
- {children}
-
-
- >
+
+ {children}
+
);
}
diff --git a/src/client/inkeep/useInkeepSettings.ts b/src/client/inkeep/useInkeepSettings.ts
index f67a1cfe..b4172b93 100644
--- a/src/client/inkeep/useInkeepSettings.ts
+++ b/src/client/inkeep/useInkeepSettings.ts
@@ -5,6 +5,8 @@ import type {
InkeepModalSettings,
} from '@inkeep/uikit';
import { AIChatDisclaimerSettings } from '@inkeep/uikit';
+import { env } from '../../env';
+
type InkeepSharedSettings = {
baseSettings: InkeepBaseSettings;
@@ -14,10 +16,14 @@ type InkeepSharedSettings = {
};
const useInkeepSettings = (): InkeepSharedSettings => {
+ const apiKey = env.NEXT_PUBLIC_INKEEP_API_KEY;
+ const integrationId = env.NEXT_PUBLIC_INKEEP_INTEGRATION_ID;
+ const organizationId = env.NEXT_PUBLIC_INKEEP_ORG_ID;
+
const baseSettings: InkeepBaseSettings = {
- apiKey: 'b0537306817fb8a0daea377df2b273d1b00ac709182d1dc7',
- integrationId: 'cm366b5qy000412p946i586tu',
- organizationId: 'org_d0VDri411QUR4Xi7',
+ apiKey,
+ integrationId,
+ organizationId,
primaryBrandColor: '#F04405',
//logEventCallback: customAnalyticsCallback,
};
diff --git a/src/env.ts b/src/env.ts
index 39c7fd79..cfbf0386 100644
--- a/src/env.ts
+++ b/src/env.ts
@@ -74,6 +74,10 @@ export const env = createEnv({
// Analytics
NEXT_PUBLIC_GTM_ID: z.string().min(1).optional(),
NEXT_PUBLIC_AMPLITUDE_API_KEY: z.string().min(1).optional(),
+ //Inkeep
+ NEXT_PUBLIC_INKEEP_API_KEY: z.string().min(1).default('b0537306817fb8a0daea377df2b273d1b00ac709182d1dc7'),
+ NEXT_PUBLIC_INKEEP_INTEGRATION_ID: z.string().min(1).default('cm366b5qy000412p946i586tu'),
+ NEXT_PUBLIC_INKEEP_ORG_ID: z.string().min(1).default('org_d0VDri411QUR4Xi7'),
},
/*
* Due to how Next.js bundles environment variables on Edge and Client,