Skip to content

Commit

Permalink
update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Oct 12, 2024
1 parent 183f760 commit 5b170cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/ui/app/src/analytics/posthog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ function ifCustomer(posthog: PostHog, run: (hog: PostHogWithCustomer) => void):

export async function initializePosthog(api_host: string, customerConfig?: DocsV1Read.PostHogConfig): Promise<void> {
const apiKey = process.env.NEXT_PUBLIC_POSTHOG_API_KEY?.trim() ?? "";
/**
* TODO: refactor this to use the posthog react provider
*/
const posthog = (await import("posthog-js")).default;

if (posthog.__loaded) {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/app/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { capturePosthogEvent } from "./analytics/posthog";
export { type CustomerAnalytics } from "./analytics/types";
export type { DocsProps } from "./atoms";
export * from "./docs/DocsPage";
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/docs-bundle/src/pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { capturePosthogEvent } from "@fern-ui/ui";
import Error from "next/error";
import { ReactElement, useEffect } from "react";
import { capturePosthogEvent } from "../../../app/src/analytics/posthog";

/**
* This is required for Next.js to generate `_next/static/chunks/pages/404.js`
Expand Down

0 comments on commit 5b170cc

Please sign in to comment.