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;
|
version: string;
|
||||||
last_checked_at: string;
|
last_checked_at: string;
|
||||||
namespace: string | null;
|
namespace: string | null;
|
||||||
|
is_telemetry_anonymous: boolean;
|
||||||
is_telemetry_enabled: boolean;
|
is_telemetry_enabled: boolean;
|
||||||
is_support_required: boolean;
|
is_support_required: boolean;
|
||||||
created_by: string | null;
|
created_by: string | null;
|
||||||
|
@ -36,6 +36,7 @@ export const AppProvider: FC<IAppProvider> = observer((props) => {
|
|||||||
const { currentWorkspace, workspaces } = useWorkspace();
|
const { currentWorkspace, workspaces } = useWorkspace();
|
||||||
const {
|
const {
|
||||||
config: { envConfig },
|
config: { envConfig },
|
||||||
|
instance: { instance },
|
||||||
} = useApplication();
|
} = useApplication();
|
||||||
// themes
|
// themes
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
@ -51,6 +52,8 @@ export const AppProvider: FC<IAppProvider> = observer((props) => {
|
|||||||
user={currentUser}
|
user={currentUser}
|
||||||
currentWorkspaceId={currentWorkspace?.id}
|
currentWorkspaceId={currentWorkspace?.id}
|
||||||
workspaceIds={Object.keys(workspaces)}
|
workspaceIds={Object.keys(workspaces)}
|
||||||
|
isCloud={!instance?.is_telemetry_anonymous || false}
|
||||||
|
telemetryEnabled={instance?.is_telemetry_enabled || false}
|
||||||
posthogAPIKey={envConfig?.posthog_api_key || null}
|
posthogAPIKey={envConfig?.posthog_api_key || null}
|
||||||
posthogHost={envConfig?.posthog_host || null}
|
posthogHost={envConfig?.posthog_host || null}
|
||||||
>
|
>
|
||||||
|
@ -19,16 +19,8 @@ export interface IPosthogWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const PostHogProvider: FC<IPosthogWrapper> = (props) => {
|
const PostHogProvider: FC<IPosthogWrapper> = (props) => {
|
||||||
const {
|
const { children, user, workspaceIds, currentWorkspaceId, posthogAPIKey, posthogHost, isCloud, telemetryEnabled } =
|
||||||
children,
|
props;
|
||||||
user,
|
|
||||||
workspaceIds,
|
|
||||||
currentWorkspaceId,
|
|
||||||
posthogAPIKey,
|
|
||||||
posthogHost,
|
|
||||||
isCloud = true,
|
|
||||||
telemetryEnabled = false,
|
|
||||||
} = props;
|
|
||||||
// states
|
// states
|
||||||
const [lastWorkspaceId, setLastWorkspaceId] = useState(currentWorkspaceId);
|
const [lastWorkspaceId, setLastWorkspaceId] = useState(currentWorkspaceId);
|
||||||
// router
|
// router
|
||||||
|
Loading…
Reference in New Issue
Block a user