Skip to content

Commit ecb1938

Browse files
atyrodecyclotruc
authored andcommitted
refactor: re-integrate telemetry hee-hee
1 parent dc8d008 commit ecb1938

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/frontend/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import SettingsDialog from './ui/SettingsDialog';
1616
import Collab from './lib/collab/Collab';
1717

1818
// Utils
19-
// import { initializePostHog } from "./lib/posthog";
19+
import { initializePostHog } from "./lib/posthog";
2020
import { lockEmbeddables, renderCustomEmbeddable } from './CustomEmbeddableRenderer';
2121
import Tabs from "./ui/Tabs";
2222
import { INITIAL_APP_DATA, HIDDEN_UI_ELEMENTS } from "./constants";

src/frontend/src/pad/buttons/ActionButton.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { useState, useEffect, useRef } from 'react';
22
import { Terminal, Braces, Settings, Plus, ExternalLink, Monitor } from 'lucide-react';
3-
import { useWorkspace, WorkspaceState } from '../../hooks/useWorkspace';
3+
import { useWorkspace } from '../../hooks/useWorkspace';
44
import { ActionType, TargetType, CodeVariant, ActionButtonProps } from './types';
55
import './ActionButton.scss';
6-
// import { capture } from '../../utils/posthog';
6+
import { capture } from '../../lib/posthog';
77
import { ExcalidrawElementFactory, PlacementMode } from '../../lib/elementFactory';
88

99
// Interface for button settings stored in customData
@@ -291,11 +291,11 @@ const ActionButton: React.FC<ActionButtonProps> = ({
291291

292292

293293
const executeAction = () => {
294-
/* capture('action_button_clicked', {
294+
capture('action_button_clicked', {
295295
target: selectedTarget,
296296
action: selectedAction,
297297
codeVariant: selectedTarget === 'code' ? selectedCodeVariant : null
298-
}); */ //TODO
298+
});
299299

300300
if (selectedAction === 'embed') {
301301
// Use the excalidrawAPI prop passed to the component

src/frontend/src/ui/AuthDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useMemo, useEffect } from "react";
2-
//import { capture } from "../lib/posthog";
2+
import { capture } from "../lib/posthog";
33
import { GoogleIcon, GithubIcon } from "../icons";
44
import "./AuthDialog.scss";
55

@@ -36,7 +36,7 @@ export const AuthDialog = ({
3636
);
3737

3838
useEffect(() => {
39-
//capture("auth_modal_shown");
39+
capture("auth_modal_shown");
4040

4141
// Load GitHub buttons script
4242
const script = document.createElement('script');

src/frontend/src/ui/MainMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import type { MainMenu as MainMenuType } from '@atyrode/excalidraw';
66
import { LogOut, SquarePlus, LayoutDashboard, User, Text, Settings, Terminal, FileText, FlaskConical } from 'lucide-react';
77
import AccountDialog from './AccountDialog';
88
import md5 from 'crypto-js/md5';
9-
// import { capture } from '../utils/posthog';
109
import { useLogout } from '../hooks/useLogout';
1110
import { useAuthStatus } from '../hooks/useAuthStatus';
1211
import { ExcalidrawElementFactory, PlacementMode } from '../lib/elementFactory';
1312
import "./MainMenu.scss";
1413
import { INITIAL_APP_DATA } from '../constants';
14+
import { capture } from '../lib/posthog';
1515
// Function to generate gravatar URL
1616
const getGravatarUrl = (email: string, size = 32) => {
1717
const hash = md5(email.toLowerCase().trim()).toString();
@@ -140,7 +140,7 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
140140
};
141141

142142
const handleLogout = () => {
143-
// capture('logout_clicked');
143+
capture('logout_clicked');
144144

145145
logoutMutation(undefined, {
146146
onSuccess: (data) => {

0 commit comments

Comments
 (0)