mirror of
https://github.com/mfts/papermark.git
synced 2025-12-20 01:03:24 +08:00
14 lines
323 B
TypeScript
14 lines
323 B
TypeScript
export function getPostHogConfig(): { key: string; host: string } | null {
|
|
const postHogKey = process.env.NEXT_PUBLIC_POSTHOG_KEY;
|
|
const postHogHost = `${process.env.NEXT_PUBLIC_BASE_URL}/ingest`;
|
|
|
|
if (!postHogKey || !postHogHost) {
|
|
return null;
|
|
}
|
|
|
|
return {
|
|
key: postHogKey,
|
|
host: postHogHost,
|
|
};
|
|
}
|