mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
fix
This commit is contained in:
1 parent
c0327f82cb
commit
1ef7422ef5
1 file changed
+4
-2
@@ -33,8 +33,7 @@ const GlobalSettingsManager = ({ env }: { env: Record<string, string> }) => {
|
||||
|
||||
/// Initizations that depends on ENV vars ///
|
||||
function PostHogInit() {
|
||||
const data = EnvironmentVariables.values;
|
||||
const apiKey = data.REACT_APP_PUBLIC_POSTHOG_KEY as string;
|
||||
const apiKey = import.meta.env.VITE_POSTHOG_API_KEY;
|
||||
posthog.init(apiKey, {
|
||||
api_host: "https://us.i.posthog.com/",
|
||||
ui_host: "https://us.i.posthog.com/",
|
||||
@@ -43,6 +42,9 @@ const GlobalSettingsManager = ({ env }: { env: Record<string, string> }) => {
|
||||
|
||||
useEffect(() => {
|
||||
EnvironmentVariables.initialize(env);
|
||||
if (import.meta.env.DEV) {
|
||||
return;
|
||||
}
|
||||
PostHogInit();
|
||||
}, [env]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user