Add posthog Telemetry (Anonymity Logic + call duration telemetry) (#658)
Co-authored-by: Timo K <timok@element.io> Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
d5326ed9ee
commit
72503d0335
14 changed files with 574 additions and 7 deletions
|
|
@ -18,7 +18,7 @@ import { EventEmitter } from "events";
|
|||
import { useMemo, useState, useEffect, useCallback } from "react";
|
||||
|
||||
// Bus to notify other useSetting consumers when a setting is changed
|
||||
const settingsBus = new EventEmitter();
|
||||
export const settingsBus = new EventEmitter();
|
||||
|
||||
// Like useState, but reads from and persists the value to localStorage
|
||||
const useSetting = <T>(
|
||||
|
|
@ -54,3 +54,4 @@ const useSetting = <T>(
|
|||
|
||||
export const useSpatialAudio = () => useSetting("spatial-audio", false);
|
||||
export const useShowInspector = () => useSetting("show-inspector", false);
|
||||
export const useOptInAnalytics = () => useSetting("opt-in-analytics", false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue