mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: added telemetry key refrences
This commit is contained in:
parent
2a51e17210
commit
5b2e271f7c
1
packages/types/src/instance.d.ts
vendored
1
packages/types/src/instance.d.ts
vendored
@ -12,6 +12,7 @@ export interface IInstance {
|
||||
version: string;
|
||||
last_checked_at: string;
|
||||
namespace: string | null;
|
||||
is_telemetry_anonymous: boolean;
|
||||
is_telemetry_enabled: boolean;
|
||||
is_support_required: boolean;
|
||||
created_by: string | null;
|
||||
|
@ -36,6 +36,7 @@ export const AppProvider: FC<IAppProvider> = observer((props) => {
|
||||
const { currentWorkspace, workspaces } = useWorkspace();
|
||||
const {
|
||||
config: { envConfig },
|
||||
instance: { instance },
|
||||
} = useApplication();
|
||||
// themes
|
||||
const { resolvedTheme } = useTheme();
|
||||
@ -51,6 +52,8 @@ export const AppProvider: FC<IAppProvider> = observer((props) => {
|
||||
user={currentUser}
|
||||
currentWorkspaceId={currentWorkspace?.id}
|
||||
workspaceIds={Object.keys(workspaces)}
|
||||
isCloud={!instance?.is_telemetry_anonymous || false}
|
||||
telemetryEnabled={instance?.is_telemetry_enabled || false}
|
||||
posthogAPIKey={envConfig?.posthog_api_key || null}
|
||||
posthogHost={envConfig?.posthog_host || null}
|
||||
>
|
||||
|
@ -19,16 +19,8 @@ export interface IPosthogWrapper {
|
||||
}
|
||||
|
||||
const PostHogProvider: FC<IPosthogWrapper> = (props) => {
|
||||
const {
|
||||
children,
|
||||
user,
|
||||
workspaceIds,
|
||||
currentWorkspaceId,
|
||||
posthogAPIKey,
|
||||
posthogHost,
|
||||
isCloud = true,
|
||||
telemetryEnabled = false,
|
||||
} = props;
|
||||
const { children, user, workspaceIds, currentWorkspaceId, posthogAPIKey, posthogHost, isCloud, telemetryEnabled } =
|
||||
props;
|
||||
// states
|
||||
const [lastWorkspaceId, setLastWorkspaceId] = useState(currentWorkspaceId);
|
||||
// router
|
||||
|
Loading…
Reference in New Issue
Block a user