- Copy admin-dashboard-web → dashboards/admin-web - Copy tracker-dashboard-web → dashboards/tracker-web - Update pnpm-workspace.yaml to include dashboards/* - Replace file: refs with workspace:* for @bytelyst/* packages - Replace all hardcoded LysnrAI/lysnn.com branding with generic platform refs - Make telemetry use NEXT_PUBLIC_PRODUCT_ID / PRODUCT_ID env vars - Update mock credentials, seed data, invitation codes, placeholders - Update READMEs, e2e tests, unit tests for product-agnostic content - Both dashboards pass tsc --noEmit clean
16 lines
518 B
TypeScript
16 lines
518 B
TypeScript
'use client';
|
|
|
|
import posthog from 'posthog-js';
|
|
import { PostHogProvider } from 'posthog-js/react';
|
|
|
|
if (typeof window !== 'undefined' && process.env.NEXT_PUBLIC_POSTHOG_KEY) {
|
|
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, {
|
|
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST || 'https://app.posthog.com',
|
|
person_profiles: 'identified_only',
|
|
});
|
|
}
|
|
|
|
export function CSPostHogProvider({ children }: { children: React.ReactNode }) {
|
|
return <PostHogProvider client={posthog}>{children}</PostHogProvider>;
|
|
}
|