Files
Greenlens/services/analytics.ts
2026-05-10 22:37:01 +02:00

18 lines
428 B
TypeScript

type AnalyticsProperties = Record<string, unknown>;
type SafeAnalytics = {
capture: (event: string, properties?: AnalyticsProperties) => void;
identify: (userId: string, properties?: AnalyticsProperties) => void;
reset: () => void;
};
const noop = () => {};
const safeAnalytics: SafeAnalytics = {
capture: noop,
identify: noop,
reset: noop,
};
export const useSafeAnalytics = (): SafeAnalytics => safeAnalytics;