feat: moved posthog key to process env (#3490)

This commit is contained in:
lohit 2024-11-20 03:24:29 +05:30 committed by GitHub
parent c322baa9c8
commit dc77ee7c04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -32,3 +32,5 @@ yarn-error.log*
# next.js
.next/
out/
.env

View File

@ -8,7 +8,7 @@ import StyledWrapper from './StyledWrapper';
import { useTheme } from 'providers/Theme/index';
let posthogClient = null;
const posthogApiKey = 'phc_7gtqSrrdZRohiozPMLIacjzgHbUlhalW1Bu16uYijMR';
const posthogApiKey = process.env.NEXT_PUBLIC_POSTHOG_API_KEY;
const getPosthogClient = () => {
if (posthogClient) {
return posthogClient;

View File

@ -13,7 +13,7 @@ import platformLib from 'platform';
import { uuid } from 'utils/common';
const { publicRuntimeConfig } = getConfig();
const posthogApiKey = 'phc_7gtqSrrdZRohiozPMLIacjzgHbUlhalW1Bu16uYijMR';
const posthogApiKey = process.env.NEXT_PUBLIC_POSTHOG_API_KEY;
let posthogClient = null;
const isPlaywrightTestRunning = () => {