App chrash + seo
This commit is contained in:
17
services/analytics.ts
Normal file
17
services/analytics.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user